Skip to content

Commit 2dda0c1

Browse files
DOC: delete removed Timedelta properties (see GH9257) from API overview + add docstring for components
1 parent c567701 commit 2dda0c1

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

doc/source/api.rst

-6
Original file line numberDiff line numberDiff line change
@@ -498,10 +498,7 @@ Due to implementation details the methods show up here as methods of the
498498
:toctree: generated/
499499

500500
TimedeltaProperties.days
501-
TimedeltaProperties.hours
502-
TimedeltaProperties.minutes
503501
TimedeltaProperties.seconds
504-
TimedeltaProperties.milliseconds
505502
TimedeltaProperties.microseconds
506503
TimedeltaProperties.nanoseconds
507504
TimedeltaProperties.components
@@ -1358,10 +1355,7 @@ Components
13581355
:toctree: generated/
13591356

13601357
TimedeltaIndex.days
1361-
TimedeltaIndex.hours
1362-
TimedeltaIndex.minutes
13631358
TimedeltaIndex.seconds
1364-
TimedeltaIndex.milliseconds
13651359
TimedeltaIndex.microseconds
13661360
TimedeltaIndex.nanoseconds
13671361
TimedeltaIndex.components

pandas/tseries/common.py

+9
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,15 @@ def to_pytimedelta(self):
139139

140140
@property
141141
def components(self):
142+
"""
143+
Return a dataframe of the components (days, hours, minutes,
144+
seconds, milliseconds, microseconds, nanoseconds) of the Timedeltas.
145+
146+
Returns
147+
-------
148+
a DataFrame
149+
150+
"""
142151
return self.values.components.set_index(self.index)
143152

144153
TimedeltaProperties._add_delegate_accessors(delegate=TimedeltaIndex,

pandas/tseries/tdi.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,8 @@ def nanoseconds(self):
370370
@property
371371
def components(self):
372372
"""
373-
Return a dataframe of the components of the Timedeltas
373+
Return a dataframe of the components (days, hours, minutes,
374+
seconds, milliseconds, microseconds, nanoseconds) of the Timedeltas.
374375
375376
Returns
376377
-------

0 commit comments

Comments
 (0)