Why does testing `NaN == NaN` not work for dropping from a pandas dataFrame?
Please explain how NaN's are treated in pandas because the following logic seems "broken" to me, I tried various ways (shown below) to drop the empty values. My dataframe, which I load from a CSV file using read.csv , has a column comments , which is empty most of the time. The column marked_results.comments looks like this; all the rest of the column is NaN, so pandas loads empty entries as NaNs, so far so good: 0 VP 1 VP 2 VP 3 TEST 4 NaN 5 NaN .... Now I try to drop those entries, only this works: marked_results.comments.isnull() All these don't work: marked_results.comments.dropna() only