From dac31a7c3e48b68af4b994c4217d5d06c3700da3 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 20 Nov 2024 19:15:09 +0900 Subject: [PATCH 1/3] fix docstrings and remove from code_checks.sh --- ci/code_checks.sh | 3 --- pandas/core/groupby/generic.py | 10 ++++++++++ pandas/core/groupby/groupby.py | 13 ------------- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 53690e9b78b8a..c435ddc29bcd8 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -98,9 +98,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.core.groupby.DataFrameGroupBy.sem SA01" \ -i "pandas.core.groupby.SeriesGroupBy.get_group RT03,SA01" \ -i "pandas.core.groupby.SeriesGroupBy.indices SA01" \ - -i "pandas.core.groupby.SeriesGroupBy.is_monotonic_decreasing SA01" \ - -i "pandas.core.groupby.SeriesGroupBy.is_monotonic_increasing SA01" \ - -i "pandas.core.groupby.SeriesGroupBy.nth PR02" \ -i "pandas.core.groupby.SeriesGroupBy.plot PR02" \ -i "pandas.core.groupby.SeriesGroupBy.sem SA01" \ -i "pandas.core.resample.Resampler.get_group RT03,SA01" \ diff --git a/pandas/core/groupby/generic.py b/pandas/core/groupby/generic.py index 5ba382bf66bb7..1de69bd40f606 100644 --- a/pandas/core/groupby/generic.py +++ b/pandas/core/groupby/generic.py @@ -1443,6 +1443,11 @@ def is_monotonic_increasing(self) -> Series: ------- Series + See Also + -------- + SeriesGroupBy.is_monotonic_decreasing : Return whether each group's values + are monotonically decreasing. + Examples -------- >>> s = pd.Series([2, 1, 3, 4], index=["Falcon", "Falcon", "Parrot", "Parrot"]) @@ -1462,6 +1467,11 @@ def is_monotonic_decreasing(self) -> Series: ------- Series + See Also + -------- + SeriesGroupBy.is_monotonic_decreasing : Return whether each group's values + are monotonically decreasing. + Examples -------- >>> s = pd.Series([2, 1, 3, 4], index=["Falcon", "Falcon", "Parrot", "Parrot"]) diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 9c30132347111..ad23127ad449f 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -3983,19 +3983,6 @@ def nth(self) -> GroupByNthSelector: 'all' or 'any'; this is equivalent to calling dropna(how=dropna) before the groupby. - Parameters - ---------- - n : int, slice or list of ints and slices - A single nth value for the row or a list of nth values or slices. - - .. versionchanged:: 1.4.0 - Added slice and lists containing slices. - Added index notation. - - dropna : {'any', 'all', None}, default None - Apply the specified dropna operation before counting which row is - the nth row. Only supported if n is an int. - Returns ------- Series or DataFrame From 35509da555e1c6ff5fd298851ad2835128026a17 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 20 Nov 2024 19:32:28 +0900 Subject: [PATCH 2/3] fix SeriesGroupBy.is_monotonic_decreasing See Also section (decreasing -> increasing) --- pandas/core/groupby/generic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/groupby/generic.py b/pandas/core/groupby/generic.py index 1de69bd40f606..35ec09892ede6 100644 --- a/pandas/core/groupby/generic.py +++ b/pandas/core/groupby/generic.py @@ -1469,8 +1469,8 @@ def is_monotonic_decreasing(self) -> Series: See Also -------- - SeriesGroupBy.is_monotonic_decreasing : Return whether each group's values - are monotonically decreasing. + SeriesGroupBy.is_monotonic_increasing : Return whether each group's values + are monotonically increasing. Examples -------- From 9b8c26e4939400e1792c42bf8e1450a0a348eb62 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 20 Nov 2024 19:57:27 +0900 Subject: [PATCH 3/3] remove DataFrameGroupBy.nth from code_checks.sh --- ci/code_checks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index c435ddc29bcd8..80d48c7f24df6 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -92,7 +92,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.core.groupby.DataFrameGroupBy.boxplot PR07,RT03,SA01" \ -i "pandas.core.groupby.DataFrameGroupBy.get_group RT03,SA01" \ -i "pandas.core.groupby.DataFrameGroupBy.indices SA01" \ - -i "pandas.core.groupby.DataFrameGroupBy.nth PR02" \ -i "pandas.core.groupby.DataFrameGroupBy.nunique SA01" \ -i "pandas.core.groupby.DataFrameGroupBy.plot PR02" \ -i "pandas.core.groupby.DataFrameGroupBy.sem SA01" \