i have 2 columns area and pincode
Area Pincode
ABC - 1234
XYZ - 4118
qwe - 1023
rty - 1234
XYZ - ?
rty - ?
qwe - ?
ABC - ?
so i have multiple areas and want to fillup pincode column based on area as I see area and pin codes are available but i notice that some pin codes are missing though the area is same Thanks!
df4.loc[df4.pins.isnull(),'pins'] = df4.loc[df4.pins.isnull(),'Area'].map(df4.loc[df4.pins.notnull()].set_index('Area')['pins'])
but this is not working