Skip to content

Commit 7816f2e

Browse files
committed
update groupby docstrings
1 parent 80b6850 commit 7816f2e

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,35 +163,27 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
163163
-i "pandas.core.groupby.DataFrameGroupBy.agg RT03" \
164164
-i "pandas.core.groupby.DataFrameGroupBy.aggregate RT03" \
165165
-i "pandas.core.groupby.DataFrameGroupBy.boxplot PR07,RT03,SA01" \
166-
-i "pandas.core.groupby.DataFrameGroupBy.filter SA01" \
167166
-i "pandas.core.groupby.DataFrameGroupBy.get_group RT03,SA01" \
168167
-i "pandas.core.groupby.DataFrameGroupBy.groups SA01" \
169168
-i "pandas.core.groupby.DataFrameGroupBy.hist RT03" \
170169
-i "pandas.core.groupby.DataFrameGroupBy.indices SA01" \
171-
-i "pandas.core.groupby.DataFrameGroupBy.max SA01" \
172-
-i "pandas.core.groupby.DataFrameGroupBy.min SA01" \
173170
-i "pandas.core.groupby.DataFrameGroupBy.nth PR02" \
174171
-i "pandas.core.groupby.DataFrameGroupBy.nunique SA01" \
175172
-i "pandas.core.groupby.DataFrameGroupBy.ohlc SA01" \
176173
-i "pandas.core.groupby.DataFrameGroupBy.plot PR02" \
177174
-i "pandas.core.groupby.DataFrameGroupBy.sem SA01" \
178-
-i "pandas.core.groupby.DataFrameGroupBy.sum SA01" \
179175
-i "pandas.core.groupby.SeriesGroupBy.__iter__ RT03,SA01" \
180176
-i "pandas.core.groupby.SeriesGroupBy.agg RT03" \
181177
-i "pandas.core.groupby.SeriesGroupBy.aggregate RT03" \
182-
-i "pandas.core.groupby.SeriesGroupBy.filter PR01,SA01" \
183178
-i "pandas.core.groupby.SeriesGroupBy.get_group RT03,SA01" \
184179
-i "pandas.core.groupby.SeriesGroupBy.groups SA01" \
185180
-i "pandas.core.groupby.SeriesGroupBy.indices SA01" \
186181
-i "pandas.core.groupby.SeriesGroupBy.is_monotonic_decreasing SA01" \
187182
-i "pandas.core.groupby.SeriesGroupBy.is_monotonic_increasing SA01" \
188-
-i "pandas.core.groupby.SeriesGroupBy.max SA01" \
189-
-i "pandas.core.groupby.SeriesGroupBy.min SA01" \
190183
-i "pandas.core.groupby.SeriesGroupBy.nth PR02" \
191184
-i "pandas.core.groupby.SeriesGroupBy.ohlc SA01" \
192185
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
193186
-i "pandas.core.groupby.SeriesGroupBy.sem SA01" \
194-
-i "pandas.core.groupby.SeriesGroupBy.sum SA01" \
195187
-i "pandas.core.resample.Resampler.__iter__ RT03,SA01" \
196188
-i "pandas.core.resample.Resampler.ffill RT03" \
197189
-i "pandas.core.resample.Resampler.get_group RT03,SA01" \

pandas/core/groupby/generic.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,12 +603,21 @@ def filter(self, func, dropna: bool = True, *args, **kwargs):
603603
dropna : bool
604604
Drop groups that do not pass the filter. True by default; if False,
605605
groups that evaluate False are filled with NaNs.
606+
*args
607+
Additional positional arguments to pass to `func`.
608+
**kwargs
609+
Additional keyword arguments to pass to `func`.
606610
607611
Returns
608612
-------
609613
Series
610614
The filtered subset of the original Series.
611615
616+
See Also
617+
--------
618+
Series.filter: Filter elements of ungrouped Series.
619+
DataFrameGroupBy.filter : Filter elements of grouped DataFrame.
620+
612621
Notes
613622
-----
614623
Functions that mutate the passed object can produce unexpected
@@ -1953,6 +1962,11 @@ def filter(self, func, dropna: bool = True, *args, **kwargs) -> DataFrame:
19531962
DataFrame
19541963
The filtered subset of the original DataFrame.
19551964
1965+
See Also
1966+
--------
1967+
DataFrame.filter: Filter elements of ungrouped DataFrame.
1968+
SeriesGroupBy.filter : Filter elements of grouped Series.
1969+
19561970
Notes
19571971
-----
19581972
Each subframe is endowed the attribute 'name' in case you need to know

pandas/core/groupby/groupby.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,15 @@ class providing the base-class of operations.
199199
Series or DataFrame
200200
Computed {fname} of values within each group.
201201
202+
See Also
203+
--------
204+
Series.min : Return the min of the group values.
205+
DataFrame.min : Return the min of the group values.
206+
Series.max : Return the max of the group values.
207+
DataFrame.max : Return the max of the group values.
208+
Series.sum : Return the sum of the group values.
209+
DataFrame.sum : Return the sum of the group values.
210+
202211
Examples
203212
--------
204213
{example}

0 commit comments

Comments
 (0)