I have a dataframe called firstpart.
I'm trying to update the values in one column (Key), but only for rows in which another column (Zone) has no data.
I'm using this code, which doesn't work:
firstpart.ix[firstpart.Zone ==np.nan,"Key"] = "newvalue"
Neither does this:
firstpart.ix[firstpart.Zone =="","Key"] = "newvalue"
Using this syntax I'm able to update values in rows for which Zone has another value, but for some reason not if I try to select the rows in which it is blank.
What am I doing wrong?