set the value in column 'b' to nan if the corresponding value in column 'a' is equal to 0 in pandas dataframe `df`,"df.ix[df.A == 0, 'B'] = np.nan"