A B
abc AN
abd BN
a01 CN
abc BN
a02 CN
I have a dataframe similar to above. For every B=CN,I want to replace corresponding row in A i.e a01,a02 with value from dictionary. The dictionary is as follow:
d={'a01':'ana','a02':'aza'}
Whenever I'm trying to replace the values, it's giving incorrect result either the values are misplaced. I tried where clause as well but still missing something.