I am testing for np.nan values in a column of a pandas dataframe.
When I do: df[df['col1'] == np.nan] I get all False values even in rows where there is a NaN.
However, np.isnan(df['col1']) works as expected.
So why the discrepancy and why does the former not work.