Skip to content

DOC: add PR07,SA01 for pandas.Timedelta #58780

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 2 commits into from
May 19, 2024
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
9 changes: 4 additions & 5 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,15 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Series.to_markdown SA01" \
-i "pandas.Series.to_string SA01" \
-i "pandas.Series.update PR07,SA01" \
-i "pandas.Timedelta PR07,SA01" \
-i "pandas.Timedelta.as_unit SA01" \
-i "pandas.Timedelta.asm8 SA01" \
-i "pandas.Timedelta.ceil SA01" \
-i "pandas.Timedelta.components SA01" \
-i "pandas.Timedelta.days SA01" \
-i "pandas.Timedelta.floor SA01" \
-i "pandas.Timedelta.max PR02,PR07,SA01" \
-i "pandas.Timedelta.min PR02,PR07,SA01" \
-i "pandas.Timedelta.resolution PR02,PR07,SA01" \
-i "pandas.Timedelta.max PR02" \
-i "pandas.Timedelta.min PR02" \
-i "pandas.Timedelta.resolution PR02" \
-i "pandas.Timedelta.round SA01" \
-i "pandas.Timedelta.to_numpy PR01" \
-i "pandas.Timedelta.to_timedelta64 SA01" \
Expand Down Expand Up @@ -264,7 +263,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Timestamp.now SA01" \
-i "pandas.Timestamp.quarter SA01" \
-i "pandas.Timestamp.replace PR07,SA01" \
-i "pandas.Timestamp.resolution PR02,PR07,SA01" \
-i "pandas.Timestamp.resolution PR02" \
-i "pandas.Timestamp.second GL08" \
-i "pandas.Timestamp.strptime PR01,SA01" \
-i "pandas.Timestamp.time SA01" \
Expand Down
10 changes: 10 additions & 0 deletions pandas/_libs/tslibs/timedeltas.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1785,6 +1785,7 @@ class Timedelta(_Timedelta):
Parameters
----------
value : Timedelta, timedelta, np.timedelta64, str, or int
Input value.
unit : str, default 'ns'
Denote the unit of the input, if input is an integer.

Expand All @@ -1810,6 +1811,15 @@ class Timedelta(_Timedelta):
Values for construction in compat with datetime.timedelta.
Numpy ints and floats will be coerced to python ints and floats.

See Also
--------
Timestamp : Represents a single timestamp in time.
TimedeltaIndex : Immutable Index of timedelta64 data.
DateOffset : Standard kind of date increment used for a date range.
to_timedelta : Convert argument to timedelta.
datetime.timedelta : Represents a duration in the datetime module.
numpy.timedelta64 : Represents a duration compatible with NumPy.

Notes
-----
The constructor may take in either both values of value and unit or
Expand Down