diff --git a/ci/code_checks.sh b/ci/code_checks.sh index a6447ffe86630..fec143744e32f 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -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" \ @@ -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" \ diff --git a/pandas/_libs/tslibs/timedeltas.pyx b/pandas/_libs/tslibs/timedeltas.pyx index 9078fd4116899..4ff2df34ac717 100644 --- a/pandas/_libs/tslibs/timedeltas.pyx +++ b/pandas/_libs/tslibs/timedeltas.pyx @@ -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. @@ -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