Skip to content

DOC: fix SA01,ES01 for pandas.Timedelta.components #59799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Series.sparse.from_coo PR07,SA01" \
-i "pandas.Series.sparse.npoints SA01" \
-i "pandas.Series.sparse.sp_values SA01" \
-i "pandas.Timedelta.components SA01" \
-i "pandas.Timedelta.max PR02" \
-i "pandas.Timedelta.min PR02" \
-i "pandas.Timedelta.resolution PR02" \
Expand Down
11 changes: 11 additions & 0 deletions pandas/_libs/tslibs/timedeltas.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1493,6 +1493,17 @@ cdef class _Timedelta(timedelta):
"""
Return a components namedtuple-like.

Each component represents a different time unit, allowing you to access the
breakdown of the total duration in terms of days, hours, minutes, seconds,
milliseconds, microseconds, and nanoseconds.

See Also
--------
Timedelta.total_seconds : Returns the total duration of the Timedelta in
seconds.
to_timedelta : Convert argument to Timedelta.
Timedelta : Represents a duration, the difference between two dates or times.

Examples
--------
>>> td = pd.Timedelta('2 day 4 min 3 us 42 ns')
Expand Down
Loading