Skip to content

Commit 709d0d6

Browse files
committed
DOC: timedelta resample docs
1 parent 2b9ecbe commit 709d0d6

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

doc/source/timedeltas.rst

+13
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ similarly to the ``Series``
295295
tds.to_pytimedelta().seconds
296296
297297
298+
.. _timedeltas.index:
299+
298300
TimedeltaIndex
299301
--------------
300302

@@ -387,3 +389,14 @@ Scalars type ops work as well. These can potentially return a *different* type o
387389
388390
# or a Float64Index if the divisor is a Timedelta
389391
tdi / tdi[0]
392+
393+
.. _timedeltas.resampling:
394+
395+
Resampling
396+
----------
397+
398+
Similar to :ref:`timeseries resampling <timeseries.resampling>`, we can resample with a ``TimedeltaIndex``.
399+
400+
.. ipython:: python
401+
402+
s.resample('D')

doc/source/timeseries.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1525,7 +1525,7 @@ infer the right offset.
15251525
'11/06/2011 03:00'])
15261526
15271527
# This will fail as there are ambiguous times
1528-
rng_hourly.tz_localize('US/Eastern')
1528+
rng_hourly.tz_localize('US/Eastern')
15291529
rng_hourly_eastern = rng_hourly.tz_localize('US/Eastern', ambiguous='infer')
15301530
rng_hourly_eastern.tolist()
15311531

0 commit comments

Comments
 (0)