Skip to content

BUG: accept np.datetime64('NaT') in an object dtyped as a null #11206

Closed
@jreback

Description

@jreback

from SO

this should work

Out[3]: array([11, 22, 33, nan, numpy.datetime64('NaT')], dtype=object)

In [4]: pd.isnull(ser)
Out[4]: 
0    False
1    False
2    False
3     True
4    False
Name: my_series, dtype: bool

This could be updated: https://github.com/pydata/pandas/blob/master/pandas/tslib.pyx#L711, then lib.isnullobj then could use for null detection

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDatetimeDatetime data dtypeMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions