Skip to content

BUG: Series.median() treats NaT as INT_MIN #8617

Closed
@ischwabacher

Description

@ischwabacher

Fixing this will be easier once numpy/numpy#5222 is fixed.

In [1]: import pandas as pd

In [2]: pd.Series([0, pd.tslib.iNaT], dtype='m8[ns]')
Out[2]: 
0   0 days
1      NaT
dtype: timedelta64[ns]

In [3]: _.median()
Out[3]: 
0   -53375 days, 23:53:38.427388
dtype: timedelta64[ns]

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateTestingpandas testing functions or related to the test suiteTimedeltaTimedelta data type

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions