From 74bd0df7f35d2886765493d91632c48a6f9b7a07 Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Mon, 13 May 2024 18:39:01 +0530 Subject: [PATCH 1/5] DOC: add PR02 for MonthEnd methods --- pandas/_libs/tslibs/offsets.pyx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pandas/_libs/tslibs/offsets.pyx b/pandas/_libs/tslibs/offsets.pyx index 1f2b8eceb39ad..7fc2ec8d90251 100644 --- a/pandas/_libs/tslibs/offsets.pyx +++ b/pandas/_libs/tslibs/offsets.pyx @@ -2939,7 +2939,7 @@ cdef class MonthEnd(MonthOffset): MonthEnd goes to the next date which is an end of the month. - Parameters + Attributes ---------- n : int, default 1 The number of months represented. @@ -3014,7 +3014,7 @@ cdef class BusinessMonthEnd(MonthOffset): BusinessMonthEnd goes to the next date which is the last business day of the month. - Parameters + Attributes ---------- n : int, default 1 The number of months represented. @@ -3222,7 +3222,7 @@ cdef class SemiMonthEnd(SemiMonthOffset): """ Two DateOffset's per month repeating on the last day of the month & day_of_month. - Parameters + Attributes ---------- n : int, default 1 The number of months represented. @@ -3231,6 +3231,10 @@ cdef class SemiMonthEnd(SemiMonthOffset): day_of_month : int, {1, 3,...,27}, default 15 A specific integer for the day of the month. + See Also + -------- + :class:`~pandas.tseries.offsets.DateOffset` : Standard kind of date increment. + Examples -------- >>> ts = pd.Timestamp(2022, 1, 14) @@ -4517,7 +4521,7 @@ cdef class CustomBusinessMonthEnd(_CustomBusinessMonth): Increments between end of month dates. - Parameters + Attributes ---------- n : int, default 1 The number of months represented. From fbd9d277c4bf6f67cefae6e200422d7e5e7908ff Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Mon, 13 May 2024 18:39:14 +0530 Subject: [PATCH 2/5] DOC: remove PR02 for MonthEnd methods --- ci/code_checks.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 24321f8ef54f7..1268bb3113ac9 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -552,7 +552,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.tseries.api.guess_datetime_format SA01" \ -i "pandas.tseries.offsets.BDay PR02,SA01" \ -i "pandas.tseries.offsets.BMonthBegin PR02" \ - -i "pandas.tseries.offsets.BMonthEnd PR02" \ -i "pandas.tseries.offsets.BQuarterBegin PR02" \ -i "pandas.tseries.offsets.BQuarterBegin.freqstr SA01" \ -i "pandas.tseries.offsets.BQuarterBegin.is_on_offset GL08" \ @@ -614,7 +613,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.tseries.offsets.BusinessMonthBegin.nanos GL08" \ -i "pandas.tseries.offsets.BusinessMonthBegin.normalize GL08" \ -i "pandas.tseries.offsets.BusinessMonthBegin.rule_code GL08" \ - -i "pandas.tseries.offsets.BusinessMonthEnd PR02" \ -i "pandas.tseries.offsets.BusinessMonthEnd.freqstr SA01" \ -i "pandas.tseries.offsets.BusinessMonthEnd.is_on_offset GL08" \ -i "pandas.tseries.offsets.BusinessMonthEnd.n GL08" \ @@ -622,7 +620,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.tseries.offsets.BusinessMonthEnd.normalize GL08" \ -i "pandas.tseries.offsets.BusinessMonthEnd.rule_code GL08" \ -i "pandas.tseries.offsets.CBMonthBegin PR02" \ - -i "pandas.tseries.offsets.CBMonthEnd PR02" \ -i "pandas.tseries.offsets.CDay PR02,SA01" \ -i "pandas.tseries.offsets.CustomBusinessDay PR02,SA01" \ -i "pandas.tseries.offsets.CustomBusinessDay.calendar GL08" \ @@ -657,7 +654,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.tseries.offsets.CustomBusinessMonthBegin.normalize GL08" \ -i "pandas.tseries.offsets.CustomBusinessMonthBegin.rule_code GL08" \ -i "pandas.tseries.offsets.CustomBusinessMonthBegin.weekmask GL08" \ - -i "pandas.tseries.offsets.CustomBusinessMonthEnd PR02" \ -i "pandas.tseries.offsets.CustomBusinessMonthEnd.calendar GL08" \ -i "pandas.tseries.offsets.CustomBusinessMonthEnd.freqstr SA01" \ -i "pandas.tseries.offsets.CustomBusinessMonthEnd.holidays GL08" \ @@ -759,7 +755,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.tseries.offsets.MonthBegin.nanos GL08" \ -i "pandas.tseries.offsets.MonthBegin.normalize GL08" \ -i "pandas.tseries.offsets.MonthBegin.rule_code GL08" \ - -i "pandas.tseries.offsets.MonthEnd PR02" \ -i "pandas.tseries.offsets.MonthEnd.freqstr SA01" \ -i "pandas.tseries.offsets.MonthEnd.is_on_offset GL08" \ -i "pandas.tseries.offsets.MonthEnd.n GL08" \ @@ -804,7 +799,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.tseries.offsets.SemiMonthBegin.nanos GL08" \ -i "pandas.tseries.offsets.SemiMonthBegin.normalize GL08" \ -i "pandas.tseries.offsets.SemiMonthBegin.rule_code GL08" \ - -i "pandas.tseries.offsets.SemiMonthEnd PR02,SA01" \ -i "pandas.tseries.offsets.SemiMonthEnd.day_of_month GL08" \ -i "pandas.tseries.offsets.SemiMonthEnd.freqstr SA01" \ -i "pandas.tseries.offsets.SemiMonthEnd.is_on_offset GL08" \ From 22bfc9d50ce1866fdc64baf8050591d66f6a713b Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Mon, 13 May 2024 19:57:40 +0530 Subject: [PATCH 3/5] DOC: restore SA01 for pandas.tseries.offsets.SemiMonthEnd --- ci/code_checks.sh | 1 + pandas/_libs/tslibs/offsets.pyx | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 1268bb3113ac9..2e1b23b566f93 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -799,6 +799,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.tseries.offsets.SemiMonthBegin.nanos GL08" \ -i "pandas.tseries.offsets.SemiMonthBegin.normalize GL08" \ -i "pandas.tseries.offsets.SemiMonthBegin.rule_code GL08" \ + -i "pandas.tseries.offsets.SemiMonthEnd SA01" \ -i "pandas.tseries.offsets.SemiMonthEnd.day_of_month GL08" \ -i "pandas.tseries.offsets.SemiMonthEnd.freqstr SA01" \ -i "pandas.tseries.offsets.SemiMonthEnd.is_on_offset GL08" \ diff --git a/pandas/_libs/tslibs/offsets.pyx b/pandas/_libs/tslibs/offsets.pyx index 7fc2ec8d90251..a1e5eea36d944 100644 --- a/pandas/_libs/tslibs/offsets.pyx +++ b/pandas/_libs/tslibs/offsets.pyx @@ -3231,10 +3231,6 @@ cdef class SemiMonthEnd(SemiMonthOffset): day_of_month : int, {1, 3,...,27}, default 15 A specific integer for the day of the month. - See Also - -------- - :class:`~pandas.tseries.offsets.DateOffset` : Standard kind of date increment. - Examples -------- >>> ts = pd.Timestamp(2022, 1, 14) From 69b806070a1214184496b655420264d5d28501d9 Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Tue, 14 May 2024 11:45:29 +0530 Subject: [PATCH 4/5] DOC: restore CustomBusinessMonthEnd --- ci/code_checks.sh | 1 + pandas/_libs/tslibs/offsets.pyx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 3041fd8eef683..cf55e581cc94d 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -649,6 +649,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.tseries.offsets.CustomBusinessMonthBegin.normalize GL08" \ -i "pandas.tseries.offsets.CustomBusinessMonthBegin.rule_code GL08" \ -i "pandas.tseries.offsets.CustomBusinessMonthBegin.weekmask GL08" \ + -i "pandas.tseries.offsets.CustomBusinessMonthEnd PR02" \ -i "pandas.tseries.offsets.CustomBusinessMonthEnd.calendar GL08" \ -i "pandas.tseries.offsets.CustomBusinessMonthEnd.freqstr SA01" \ -i "pandas.tseries.offsets.CustomBusinessMonthEnd.holidays GL08" \ diff --git a/pandas/_libs/tslibs/offsets.pyx b/pandas/_libs/tslibs/offsets.pyx index 017ccf23de76e..046b4dfc5606b 100644 --- a/pandas/_libs/tslibs/offsets.pyx +++ b/pandas/_libs/tslibs/offsets.pyx @@ -4517,7 +4517,7 @@ cdef class CustomBusinessMonthEnd(_CustomBusinessMonth): Increments between end of month dates. - Attributes + Parameters ---------- n : int, default 1 The number of months represented. From 9a3b097dc5bc24638f00558c341c3f5428832e7f Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Tue, 14 May 2024 12:30:07 +0530 Subject: [PATCH 5/5] DOC: restore pandas.tseries.offsets.CBMonthEnd PR02 --- ci/code_checks.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index cf55e581cc94d..44823b20d4fba 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -615,6 +615,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.tseries.offsets.BusinessMonthEnd.normalize GL08" \ -i "pandas.tseries.offsets.BusinessMonthEnd.rule_code GL08" \ -i "pandas.tseries.offsets.CBMonthBegin PR02" \ + -i "pandas.tseries.offsets.CBMonthEnd PR02" \ -i "pandas.tseries.offsets.CDay PR02,SA01" \ -i "pandas.tseries.offsets.CustomBusinessDay PR02,SA01" \ -i "pandas.tseries.offsets.CustomBusinessDay.calendar GL08" \