Skip to content

Commit 0d6a48c

Browse files
DOC: fix SA01 for pandas.Timedelta.days (#59068)
* DOC: fix SA01 for pandas.Timedelta.days * DOC: fix SA01 for pandas.Timedelta.days
1 parent 75ac95e commit 0d6a48c

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
213213
-i "pandas.Timedelta.asm8 SA01" \
214214
-i "pandas.Timedelta.ceil SA01" \
215215
-i "pandas.Timedelta.components SA01" \
216-
-i "pandas.Timedelta.days SA01" \
217216
-i "pandas.Timedelta.floor SA01" \
218217
-i "pandas.Timedelta.max PR02" \
219218
-i "pandas.Timedelta.min PR02" \

pandas/_libs/tslibs/timedeltas.pyx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,10 +1078,22 @@ cdef class _Timedelta(timedelta):
10781078
"""
10791079
Returns the days of the timedelta.
10801080
1081+
The `days` attribute of a `pandas.Timedelta` object provides the number
1082+
of days represented by the `Timedelta`. This is useful for extracting
1083+
the day component from a `Timedelta` that may also include hours, minutes,
1084+
seconds, and smaller time units. This attribute simplifies the process
1085+
of working with durations where only the day component is of interest.
1086+
10811087
Returns
10821088
-------
10831089
int
10841090
1091+
See Also
1092+
--------
1093+
Timedelta.seconds : Returns the seconds component of the timedelta.
1094+
Timedelta.microseconds : Returns the microseconds component of the timedelta.
1095+
Timedelta.total_seconds : Returns the total duration in seconds.
1096+
10851097
Examples
10861098
--------
10871099
>>> td = pd.Timedelta(1, "d")

0 commit comments

Comments
 (0)