Is there any way to replace value using dictionary or mapping? I have dataframe like this:
Q14r63: Audi Q14r2: BMW Q14r1: VW
Selected Not Selected Not Selected
Not Selected Selected Selected
Selected Selected Not Selected
and i have another dataframe which provides codes for the Brands. This df ofcourse can be changed into dictionary also.
Brand Code
Audi 63
BMW 2
VW 1
Is there any way to get output where "selected" values in main df can be be changes with car brand?
Desired Output
Q14r63: Audi Q14r2: BMW Q14r1: VW
Audi NaN NaN
NaN BMW VW
Audi BMW NaN