From ee930d791f9523f632b0b507e09de301a823e1d5 Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Tue, 7 May 2024 12:58:01 +0530 Subject: [PATCH 1/5] DOC: add SA01 for pandas.Timestamp.as_unit --- pandas/_libs/tslibs/timestamps.pyx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pandas/_libs/tslibs/timestamps.pyx b/pandas/_libs/tslibs/timestamps.pyx index c1b615839c8cc..c24cc91f56bc3 100644 --- a/pandas/_libs/tslibs/timestamps.pyx +++ b/pandas/_libs/tslibs/timestamps.pyx @@ -1115,6 +1115,14 @@ cdef class _Timestamp(ABCTimestamp): ------- Timestamp + See Also + -------- + Timestamp.asm8 : Return numpy datetime64 format in nanoseconds. + Timestamp.to_pydatetime : Convert Timestamp object to a native + Python datetime object. + to_timedelta : Convert argument into timedelta object, + which can represent differences in times. + Examples -------- >>> ts = pd.Timestamp('2023-01-01 00:00:00.01') From 42a95691172ef3fc32655c9c60bb94a1e687c0cb Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Tue, 7 May 2024 12:58:16 +0530 Subject: [PATCH 2/5] DOC: remove SA01 for pandas.Timestamp.as_unit --- ci/code_checks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 83d9ef3d05dba..0f1cec99f88f3 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -285,7 +285,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.TimedeltaIndex.nanoseconds SA01" \ -i "pandas.TimedeltaIndex.seconds SA01" \ -i "pandas.TimedeltaIndex.to_pytimedelta RT03,SA01" \ - -i "pandas.Timestamp.as_unit SA01" \ -i "pandas.Timestamp.asm8 SA01" \ -i "pandas.Timestamp.astimezone SA01" \ -i "pandas.Timestamp.ceil SA01" \ From 4995120b6139e9480b507376743e5d65e48bb80e Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Wed, 8 May 2024 10:00:21 +0530 Subject: [PATCH 3/5] DOC: add SA01 for pandas.Timedelta.as_unit --- pandas/_libs/tslibs/nattype.pyx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pandas/_libs/tslibs/nattype.pyx b/pandas/_libs/tslibs/nattype.pyx index 0108fc8fb7eed..7da50ba818272 100644 --- a/pandas/_libs/tslibs/nattype.pyx +++ b/pandas/_libs/tslibs/nattype.pyx @@ -1383,6 +1383,14 @@ default 'raise' ------- Timestamp + See Also + -------- + Timestamp.asm8 : Return numpy datetime64 format in nanoseconds. + Timestamp.to_pydatetime : Convert Timestamp object to a native + Python datetime object. + to_timedelta : Convert argument into timedelta object, + which can represent differences in times. + Examples -------- >>> ts = pd.Timestamp('2023-01-01 00:00:00.01') From 799e6dbbfe259b101a34ad9d041f7052094db881 Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Wed, 8 May 2024 10:00:32 +0530 Subject: [PATCH 4/5] DOC: remove SA01 for pandas.Timedelta.as_unit --- ci/code_checks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 0f1cec99f88f3..2f8c30d4e31d4 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -265,7 +265,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Series.var PR01,RT03,SA01" \ -i "pandas.SparseDtype 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" \ From 47178c0aad9aecd7374f2835e16febeb0f223d60 Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Wed, 8 May 2024 10:35:43 +0530 Subject: [PATCH 5/5] DOC: remove SA01 for pandas.Timedelta.as_unit --- ci/code_checks.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 3040635e8a1d0..53790ddb73a38 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -261,6 +261,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Series.var PR01,RT03,SA01" \ -i "pandas.SparseDtype 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" \