From bd4e9ce9bdefb922816750b5c37321d5aa347e79 Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Mon, 29 Apr 2024 22:34:54 +0530 Subject: [PATCH 1/2] DOC: add PR01,RT03 for pandas.DatetimeIndex.snap --- pandas/core/indexes/datetimes.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pandas/core/indexes/datetimes.py b/pandas/core/indexes/datetimes.py index 951455b627fbd..67f1e08731ba1 100644 --- a/pandas/core/indexes/datetimes.py +++ b/pandas/core/indexes/datetimes.py @@ -451,9 +451,17 @@ def snap(self, freq: Frequency = "S") -> DatetimeIndex: """ Snap time stamps to nearest occurring frequency. + Parameters + ---------- + freq : str, Timedelta, datetime.timedelta, or DateOffset, default 'S' + Frequency strings can have multiples, e.g. '5h'. See + :ref:`here ` for a list of + frequency aliases. + Returns ------- DatetimeIndex + Time stamps to nearest occurring `freq`. See Also -------- From c0b63f6fe5777f3b5d378478925a339ebe837d97 Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Mon, 29 Apr 2024 22:35:14 +0530 Subject: [PATCH 2/2] DOC: remove pandas.DatetimeIndex.snap --- ci/code_checks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 2b418d6655b0b..37188ac1c5cf2 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -99,7 +99,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.DataFrame.to_markdown SA01" \ -i "pandas.DataFrame.var PR01,RT03,SA01" \ -i "pandas.DatetimeIndex.indexer_at_time PR01,RT03" \ - -i "pandas.DatetimeIndex.snap PR01,RT03" \ -i "pandas.DatetimeIndex.to_period RT03" \ -i "pandas.Grouper PR02" \ -i "pandas.Index PR07" \