File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -359,7 +359,7 @@ Resample API
359
359
^^^^^^^^^^^^
360
360
361
361
Like the change in the window functions API :ref:`above <whatsnew_0180.enhancements.moments>`, ``.resample(...)`` is changing to have
362
- a more groupby-like API. (:issue:`11732`).
362
+ a more groupby-like API. (:issue:`11732`, :issue:`12702` ).
363
363
364
364
.. ipython:: python
365
365
Original file line number Diff line number Diff line change @@ -522,6 +522,15 @@ def test_resample_single_period_timedelta(self):
522
522
'1 day' , freq = '2s' , periods = 3 ))
523
523
assert_series_equal (result , expected )
524
524
525
+ def test_resample_timedelta_idempotency (self ):
526
+
527
+ # GH 12072
528
+ index = pd .timedelta_range ('0' , periods = 9 , freq = '10L' )
529
+ series = pd .Series (range (9 ), index = index )
530
+ result = series .resample ('10L' ).mean ()
531
+ expected = series
532
+ assert_series_equal (result , expected )
533
+
525
534
def test_resample_rounding (self ):
526
535
# GH 8371
527
536
# odd results when rounding is needed
You can’t perform that action at this time.
0 commit comments