1

In this question,Pandas Lambda Function with Nan Support first answer says to use pd.isnull(), but it is invalid after I use it.In another question,Pandas - dataframe.apply(lambad x: x is np.nan) does not work,the way the questioner works is working for me,Why is this? I use pandas 0.24.2,numpy 1.13.1

https://stackoverflow.com/a/56392974/9817585

martineau
  • 119,623
  • 25
  • 170
  • 301
David Wei
  • 118
  • 5

1 Answers1

0

I am the questioner. So far, I still don't know the deeper reason, but I have these experiences, for object, use is np.nan() or pd.isna(). For a float, use np.isnan() or pd.isna(). always works with pd.isna()

David Wei
  • 118
  • 5
  • Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. - [From Review](/review/late-answers/30749363) – SherylHohman Jan 09 '22 at 04:10