I was wondering why the result of
pandas.Series([numpy.nan]).astype("bool")
is True
?
I was wondering why the result of
pandas.Series([numpy.nan]).astype("bool")
is True
?
Probably because np.nan
objects are themselves truthy:
>>> bool(np.nan)
True