Skip to content

Commit

Permalink
DOC: add PR07,SA01 for pandas.Timedelta (#58780)
Browse files Browse the repository at this point in the history
* DOC: add PR07,SA01 for pandas.Timedelta

* DOC: fix SA01, PR07
  • Loading branch information
tuhinsharma121 authored May 19, 2024
1 parent f32a8cd commit e7124c7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
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

0 comments on commit e7124c7

Please sign in to comment.