From d9d5c89dc58a4e87261c9224dae8a9576231a280 Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Sat, 18 May 2024 10:37:37 +0530 Subject: [PATCH 1/2] DOC: add SA01 for pandas.Timestamp.isocalendar --- pandas/_libs/tslibs/nattype.pyx | 6 ++++++ pandas/_libs/tslibs/timestamps.pyx | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/pandas/_libs/tslibs/nattype.pyx b/pandas/_libs/tslibs/nattype.pyx index 8319af2148918..47dae458a28c1 100644 --- a/pandas/_libs/tslibs/nattype.pyx +++ b/pandas/_libs/tslibs/nattype.pyx @@ -528,6 +528,12 @@ class NaTType(_NaT): """ Return a named tuple containing ISO year, week number, and weekday. + See Also + -------- + DatetimeIndex.isocalendar : Return a 3-tuple containing ISO year, + week number, and weekday for the given DatetimeIndex object. + datetime.date.isocalendar : The equivalent method for `datetime.date` objects. + Examples -------- >>> ts = pd.Timestamp('2023-01-01 10:00:00') diff --git a/pandas/_libs/tslibs/timestamps.pyx b/pandas/_libs/tslibs/timestamps.pyx index a33df56e65873..4a72ade045168 100644 --- a/pandas/_libs/tslibs/timestamps.pyx +++ b/pandas/_libs/tslibs/timestamps.pyx @@ -1691,6 +1691,12 @@ class Timestamp(_Timestamp): """ Return a named tuple containing ISO year, week number, and weekday. + See Also + -------- + DatetimeIndex.isocalendar : Return a 3-tuple containing ISO year, + week number, and weekday for the given DatetimeIndex object. + datetime.date.isocalendar : The equivalent method for `datetime.date` objects. + Examples -------- >>> ts = pd.Timestamp('2023-01-01 10:00:00') From 8d61d2dae8f9e1f2b5b4eb46b65ee5c94217476d Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Sat, 18 May 2024 10:37:58 +0530 Subject: [PATCH 2/2] DOC: remove SA01 for pandas.Timestamp.isocalendar --- ci/code_checks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 180083dbbb742..8238be126a195 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -256,7 +256,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Timestamp.fromordinal SA01" \ -i "pandas.Timestamp.fromtimestamp PR01,SA01" \ -i "pandas.Timestamp.hour GL08" \ - -i "pandas.Timestamp.isocalendar SA01" \ -i "pandas.Timestamp.isoweekday SA01" \ -i "pandas.Timestamp.max PR02" \ -i "pandas.Timestamp.microsecond GL08" \