If I run the following code:
dft1 = pd.DataFrame({'a':[1, np.nan, np.nan]})
dft2 = pd.DataFrame({'a':[1, 1, np.nan]})
dft1.a==dft2.a
The result is
0 True
1 False
2 False
Name: a, dtype: bool
How can I make the result to be
0 True
1 False
2 True
Name: a, dtype: bool
I.e., np.nan == np.nan evaluates to True.
I thought this is basic functionality and I must be asking a duplicate question, but I spent a lot of time search in SO or in Google and couldn't find it.