I would like to find where None is found in the dataframe.
pd.DataFrame([None,np.nan]).isnull()
OUT:
0
0 True
1 True
isnull() finds bo
You could use applymap
with a lambda
to check if an element is None
as follows, (constructed a different example, as in your original one, None
is coerced to np.nan
because the data type is float
, you will need an object
type column to hold None
as is, or as commented by @Evert, None
and NaN
are indistinguishable in numeric type columns):
df = pd.DataFrame([[None, 3], ["", np.nan]])
df
# 0 1
#0 None 3.0
#1 NaN
df.applymap(lambda x: x is None)
# 0 1
#0 True False
#1 False False