From 9367d0487c544e539daf5cba854af9ad34c90714 Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Mon, 17 Jun 2024 18:41:20 +0530 Subject: [PATCH] DOC: fix SA01 for pandas.Timedelta.as_unit --- ci/code_checks.sh | 1 - pandas/_libs/tslibs/timedeltas.pyx | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 4d74fec24c4ab..ffa26f4821705 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -211,7 +211,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Series.to_frame SA01" \ -i "pandas.Series.to_markdown SA01" \ -i "pandas.Series.update PR07,SA01" \ - -i "pandas.Timedelta.as_unit SA01" \ -i "pandas.Timedelta.asm8 SA01" \ -i "pandas.Timedelta.ceil SA01" \ -i "pandas.Timedelta.components SA01" \ diff --git a/pandas/_libs/tslibs/timedeltas.pyx b/pandas/_libs/tslibs/timedeltas.pyx index 4ff2df34ac717..dc4aed9920734 100644 --- a/pandas/_libs/tslibs/timedeltas.pyx +++ b/pandas/_libs/tslibs/timedeltas.pyx @@ -1731,6 +1731,12 @@ cdef class _Timedelta(timedelta): ------- Timedelta + See Also + -------- + Timedelta : Represents a duration, the difference between two dates or times. + to_timedelta : Convert argument to timedelta. + Timedelta.asm8 : Return a numpy timedelta64 array scalar view. + Examples -------- >>> td = pd.Timedelta('1001ms')