diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 73b389e427648..606ede4e861fa 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -105,7 +105,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Timedelta.min PR02" \ -i "pandas.Timedelta.resolution PR02" \ -i "pandas.Timedelta.to_timedelta64 SA01" \ - -i "pandas.Timedelta.total_seconds SA01" \ -i "pandas.TimedeltaIndex.to_pytimedelta RT03,SA01" \ -i "pandas.Timestamp.max PR02" \ -i "pandas.Timestamp.min PR02" \ diff --git a/pandas/_libs/tslibs/nattype.pyx b/pandas/_libs/tslibs/nattype.pyx index 60afc1acdc297..620e0846c750e 100644 --- a/pandas/_libs/tslibs/nattype.pyx +++ b/pandas/_libs/tslibs/nattype.pyx @@ -493,6 +493,14 @@ class NaTType(_NaT): """ Total seconds in the duration. + This method calculates the total duration in seconds by combining + the days, seconds, and microseconds of the `Timedelta` object. + + See Also + -------- + to_timedelta : Convert argument to timedelta. + Timedelta : Represents a duration, the difference between two dates or times. + Examples -------- >>> td = pd.Timedelta('1min') diff --git a/pandas/_libs/tslibs/timedeltas.pyx b/pandas/_libs/tslibs/timedeltas.pyx index 6159bd0dadb47..0ff5c5fb81df8 100644 --- a/pandas/_libs/tslibs/timedeltas.pyx +++ b/pandas/_libs/tslibs/timedeltas.pyx @@ -1189,6 +1189,14 @@ cdef class _Timedelta(timedelta): """ Total seconds in the duration. + This method calculates the total duration in seconds by combining + the days, seconds, and microseconds of the `Timedelta` object. + + See Also + -------- + to_timedelta : Convert argument to timedelta. + Timedelta : Represents a duration, the difference between two dates or times. + Examples -------- >>> td = pd.Timedelta('1min')