Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Series.max incorrect for skipna=False with missing datetime64[ns] data. #24265

Closed
TomAugspurger opened this issue Dec 13, 2018 · 0 comments · Fixed by #24293
Closed

Series.max incorrect for skipna=False with missing datetime64[ns] data. #24265

TomAugspurger opened this issue Dec 13, 2018 · 0 comments · Fixed by #24293
Labels
Datetime Datetime data dtype Numeric Operations Arithmetic, Comparison, and Logical operations
Milestone

Comments

@TomAugspurger
Copy link
Contributor

In [2]: s = pd.Series([1, None, 3], dtype='datetime64[ns]')

In [3]: s.max(skipna=False)
Out[3]: Timestamp('1970-01-01 00:00:00.000000003')

That should be NaT.

We get min correct, but think just because iNaT is already the min.

Probably affects datetimetz / timedelta as well.

@TomAugspurger TomAugspurger added Datetime Datetime data dtype Numeric Operations Arithmetic, Comparison, and Logical operations labels Dec 13, 2018
TomAugspurger added a commit to TomAugspurger/pandas that referenced this issue Dec 13, 2018
@jreback jreback added this to the 0.24.0 milestone Dec 29, 2018
jbrockmendel added a commit to jbrockmendel/pandas that referenced this issue Dec 29, 2018
gfyoung pushed a commit that referenced this issue Dec 30, 2018
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this issue Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this issue Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Numeric Operations Arithmetic, Comparison, and Logical operations
Projects
None yet
2 participants