Skip to content

BUG GH23282 calling min on series of NaT returns NaT #23289

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

Merged
merged 12 commits into from
Oct 28, 2018
Prev Previous commit
Next Next commit
BUG-23282 add more underscores
  • Loading branch information
JustinZhengBC committed Oct 25, 2018
commit 9d6dca3dacc533da7e45c0dbfa597d6a6504b57c
6 changes: 3 additions & 3 deletions pandas/core/nanops.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def nanany(values, axis=None, skipna=True, mask=None):
>>> nanops.nanany(s)
False
"""
values, mask, dtype, _ = _get_values(values, skipna, False, copy=skipna,
values, mask, dtype, _, _ = _get_values(values, skipna, False, copy=skipna,
mask=mask)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

listing error I would guess.

return values.any(axis)

Expand Down Expand Up @@ -383,7 +383,7 @@ def nanall(values, axis=None, skipna=True, mask=None):
>>> nanops.nanall(s)
False
"""
values, mask, dtype, _ = _get_values(values, skipna, True, copy=skipna,
values, mask, dtype, _, _ = _get_values(values, skipna, True, copy=skipna,
mask=mask)
return values.all(axis)

Expand Down Expand Up @@ -413,7 +413,7 @@ def nansum(values, axis=None, skipna=True, min_count=0, mask=None):
>>> nanops.nansum(s)
3.0
"""
values, mask, dtype, dtype_max = _get_values(values, skipna, 0, mask=mask)
values, mask, dtype, dtype_max, _ = _get_values(values, skipna, 0, mask=mask)
dtype_sum = dtype_max
if is_float_dtype(dtype):
dtype_sum = dtype
Expand Down