Skip to content

Commit a71df34

Browse files
DOC: fix SA01,ES01 for pandas.Timedelta.components (#59799)
1 parent 73c4fce commit a71df34

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
102102
-i "pandas.Series.sparse.from_coo PR07,SA01" \
103103
-i "pandas.Series.sparse.npoints SA01" \
104104
-i "pandas.Series.sparse.sp_values SA01" \
105-
-i "pandas.Timedelta.components SA01" \
106105
-i "pandas.Timedelta.max PR02" \
107106
-i "pandas.Timedelta.min PR02" \
108107
-i "pandas.Timedelta.resolution PR02" \

pandas/_libs/tslibs/timedeltas.pyx

+11
Original file line numberDiff line numberDiff line change
@@ -1493,6 +1493,17 @@ cdef class _Timedelta(timedelta):
14931493
"""
14941494
Return a components namedtuple-like.
14951495
1496+
Each component represents a different time unit, allowing you to access the
1497+
breakdown of the total duration in terms of days, hours, minutes, seconds,
1498+
milliseconds, microseconds, and nanoseconds.
1499+
1500+
See Also
1501+
--------
1502+
Timedelta.total_seconds : Returns the total duration of the Timedelta in
1503+
seconds.
1504+
to_timedelta : Convert argument to Timedelta.
1505+
Timedelta : Represents a duration, the difference between two dates or times.
1506+
14961507
Examples
14971508
--------
14981509
>>> td = pd.Timedelta('2 day 4 min 3 us 42 ns')

0 commit comments

Comments
 (0)