I have a dataframe and some of the values need to be updated. However, I want to leave the values without a key value as it currently is.
I tried other code but when I run the code it changes all the values without a key pair to NaN.
How do I go from
Df
City Employer
Toronto Magna's Automotive
Toronto Manga
Vancouver Dunder
Calgary Flames
mapping file
d = {'Manga':"Magna's Automotive",
'Dunder': 'Dunder Mifflin',}
Df-desired
City Employer
Toronto Magna's Automotive
Toronto Magna's Automotive
Vancouver Dunder Mifflin
Calgary Flames