Skip to content

Commit fcb9dff

Browse files
ensalada-de-polloroot
authored andcommitted
DOC: Fix docstrings for SeriesGroupBy monotonic and nth (pandas-dev#60375)
* fix docstrings and remove from code_checks.sh * fix SeriesGroupBy.is_monotonic_decreasing See Also section (decreasing -> increasing) * remove DataFrameGroupBy.nth from code_checks.sh --------- Co-authored-by: root <[email protected]>
1 parent 8a1de7b commit fcb9dff

File tree

3 files changed

+10
-17
lines changed

3 files changed

+10
-17
lines changed

ci/code_checks.sh

-4
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,11 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
9292
-i "pandas.core.groupby.DataFrameGroupBy.boxplot PR07,RT03,SA01" \
9393
-i "pandas.core.groupby.DataFrameGroupBy.get_group RT03,SA01" \
9494
-i "pandas.core.groupby.DataFrameGroupBy.indices SA01" \
95-
-i "pandas.core.groupby.DataFrameGroupBy.nth PR02" \
9695
-i "pandas.core.groupby.DataFrameGroupBy.nunique SA01" \
9796
-i "pandas.core.groupby.DataFrameGroupBy.plot PR02" \
9897
-i "pandas.core.groupby.DataFrameGroupBy.sem SA01" \
9998
-i "pandas.core.groupby.SeriesGroupBy.get_group RT03,SA01" \
10099
-i "pandas.core.groupby.SeriesGroupBy.indices SA01" \
101-
-i "pandas.core.groupby.SeriesGroupBy.is_monotonic_decreasing SA01" \
102-
-i "pandas.core.groupby.SeriesGroupBy.is_monotonic_increasing SA01" \
103-
-i "pandas.core.groupby.SeriesGroupBy.nth PR02" \
104100
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
105101
-i "pandas.core.groupby.SeriesGroupBy.sem SA01" \
106102
-i "pandas.core.resample.Resampler.get_group RT03,SA01" \

pandas/core/groupby/generic.py

+10
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,11 @@ def is_monotonic_increasing(self) -> Series:
14431443
-------
14441444
Series
14451445
1446+
See Also
1447+
--------
1448+
SeriesGroupBy.is_monotonic_decreasing : Return whether each group's values
1449+
are monotonically decreasing.
1450+
14461451
Examples
14471452
--------
14481453
>>> s = pd.Series([2, 1, 3, 4], index=["Falcon", "Falcon", "Parrot", "Parrot"])
@@ -1462,6 +1467,11 @@ def is_monotonic_decreasing(self) -> Series:
14621467
-------
14631468
Series
14641469
1470+
See Also
1471+
--------
1472+
SeriesGroupBy.is_monotonic_increasing : Return whether each group's values
1473+
are monotonically increasing.
1474+
14651475
Examples
14661476
--------
14671477
>>> s = pd.Series([2, 1, 3, 4], index=["Falcon", "Falcon", "Parrot", "Parrot"])

pandas/core/groupby/groupby.py

-13
Original file line numberDiff line numberDiff line change
@@ -3983,19 +3983,6 @@ def nth(self) -> GroupByNthSelector:
39833983
'all' or 'any'; this is equivalent to calling dropna(how=dropna)
39843984
before the groupby.
39853985
3986-
Parameters
3987-
----------
3988-
n : int, slice or list of ints and slices
3989-
A single nth value for the row or a list of nth values or slices.
3990-
3991-
.. versionchanged:: 1.4.0
3992-
Added slice and lists containing slices.
3993-
Added index notation.
3994-
3995-
dropna : {'any', 'all', None}, default None
3996-
Apply the specified dropna operation before counting which row is
3997-
the nth row. Only supported if n is an int.
3998-
39993986
Returns
40003987
-------
40013988
Series or DataFrame

0 commit comments

Comments
 (0)