I have this series:
ser=pd.Series([11,22,33,np.nan,np.datetime64('nat')],name='my_series')
The series looks like this:
0 11
1 22
2 33
3 NaN
4 NaN
Name: my_series, dtype: object
But I get only one True
for NULL values:
ser.isnull()
0 False
1 False
2 False
3 True
4 False
Name: my_series, dtype: bool
Is it a bug or how can I count correctly the NULL values in a pandas series? This does not help:
ser=ser.replace('NaN',np.nan)
Thanks!
I ran into a similar issue this morning but in an str series! This worked for me and with your sample data as well:
pd.isna(ser)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With