I have this dataframe:
I want to create a ZIP column which will get the value of ZIP_y when ZIP_x is NaN and the value of ZIP_x when ZIP_x is not NaN.
I tried this code:
dm["ZIP"]=numpy.where(dm["ZIP_x"] is numpy.nan, dm["ZIP_y"],dm["ZIP_x"])
But that gave me this output:
As you can see, the ZIP column seems to be getting the values of ZIP_x in each of its cells.
Do you know how to achieve what I am after?

