Skip to content

Commit 15b8454

Browse files
committed
Merge pull request #8268 from jreback/nat
TST: tests for reduction of series with nan timedelta (GH7661)
2 parents cfdae80 + d553fb1 commit 15b8454

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

doc/source/v0.15.0.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ TimedeltaIndex/Scalar
479479
We introduce a new scalar type ``Timedelta``, which is a subclass of ``datetime.timedelta``, and behaves in a similar manner,
480480
but allows compatibility with ``np.timedelta64`` types as well as a host of custom representation, parsing, and attributes.
481481
This type is very similar to how ``Timestamp`` works for ``datetimes``. It is a nice-API box for the type. See the :ref:`docs <timedeltas.timedeltas>`.
482-
(:issue:`3009`, :issue:`4533`, :issue:`8209`, :issue:`8187`, :issue:`8190`, :issue:`7869`)
482+
(:issue:`3009`, :issue:`4533`, :issue:`8209`, :issue:`8187`, :issue:`8190`, :issue:`7869`, :issue:`7661`)
483483

484484
.. warning::
485485

pandas/tests/test_series.py

+4
Original file line numberDiff line numberDiff line change
@@ -2371,6 +2371,10 @@ def test_quantile(self):
23712371
q = tds.quantile(.25)
23722372
self.assertEqual(q, pd.to_timedelta('24:00:00'))
23732373

2374+
# GH7661
2375+
result = Series([np.timedelta64('NaT')]).sum()
2376+
self.assertTrue(result is pd.NaT)
2377+
23742378
def test_quantile_multi(self):
23752379
from numpy import percentile
23762380

0 commit comments

Comments
 (0)