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"