Assume I have a dataframe df
where the column A
consists of 10 None
and the rest is something else.
If I do the slicing df=df[df["A"]==None]
I get a wrong result. I figured out that df["A"]==None
returns False
(even when the elements are None
) but df["A"].values==None
returns the correct.
How come? Shouldn't we be able to slice in the first way ?