From 1d307c7a56cbbacacdafc4240cad66797bca98fa Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Sat, 22 Jun 2024 13:12:51 +0530 Subject: [PATCH 1/2] DOC: fix SA01 for pandas.Timestamp.floor --- ci/code_checks.sh | 1 - pandas/_libs/tslibs/timestamps.pyx | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 013f7abe5ff0d..424171cee794c 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -231,7 +231,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Timestamp.ctime SA01" \ -i "pandas.Timestamp.date SA01" \ -i "pandas.Timestamp.day GL08" \ - -i "pandas.Timestamp.floor SA01" \ -i "pandas.Timestamp.fold GL08" \ -i "pandas.Timestamp.fromordinal SA01" \ -i "pandas.Timestamp.fromtimestamp PR01,SA01" \ diff --git a/pandas/_libs/tslibs/timestamps.pyx b/pandas/_libs/tslibs/timestamps.pyx index 9cd0fea1d618e..707e36a848a49 100644 --- a/pandas/_libs/tslibs/timestamps.pyx +++ b/pandas/_libs/tslibs/timestamps.pyx @@ -2207,6 +2207,12 @@ timedelta}, default 'raise' ------ ValueError if the freq cannot be converted. + See Also + -------- + Timestamp.ceil : Round up a Timestamp to the specified resolution. + Timestamp.round : Round a Timestamp to the specified resolution. + Series.dt.floor : Round down the datetime values in a Series. + Notes ----- If the Timestamp has a timezone, flooring will take place relative to the From 19d6e2510fef3a4ee05b10d1713873eecf9bcf20 Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Mon, 24 Jun 2024 22:09:57 +0530 Subject: [PATCH 2/2] DOC: fix SA01 for pandas.Timestamp.floor --- pandas/_libs/tslibs/nattype.pyx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandas/_libs/tslibs/nattype.pyx b/pandas/_libs/tslibs/nattype.pyx index c483814a3ef74..653097026465a 100644 --- a/pandas/_libs/tslibs/nattype.pyx +++ b/pandas/_libs/tslibs/nattype.pyx @@ -1139,6 +1139,12 @@ timedelta}, default 'raise' ------ ValueError if the freq cannot be converted. + See Also + -------- + Timestamp.ceil : Round up a Timestamp to the specified resolution. + Timestamp.round : Round a Timestamp to the specified resolution. + Series.dt.floor : Round down the datetime values in a Series. + Notes ----- If the Timestamp has a timezone, flooring will take place relative to the