Skip to content

Commit 3f35609

Browse files
committed
BUG-23282 Add additional tests
1 parent a315ef0 commit 3f35609

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/core/nanops.py

+3
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,9 @@ def reduction(values, axis=None, skipna=True, mask=None):
721721
result = np.nan
722722
else:
723723
result = getattr(values, meth)(axis)
724+
if (is_integer(result) and is_datetime_or_timedelta_dtype(dtype)
725+
and result == _int64_max):
726+
result = tslibs.iNaT
724727

725728
result = _wrap_results(result, dtype)
726729
return _maybe_null_out(result, axis, mask)

0 commit comments

Comments
 (0)