Skip to content

DOC: Fix documentation for DataFrameGroupBy.filter and SeriesGroupBy.filter #61301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions pandas/core/groupby/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,9 +727,9 @@ def _transform_general(

def filter(self, func, dropna: bool = True, *args, **kwargs):
"""
Filter elements from groups that don't satisfy a criterion.
Filter groups that don't satisfy a criterion.

Elements from groups are filtered if they do not satisfy the
Groups are filtered if they do not satisfy the
boolean criterion specified by func.

Parameters
Expand All @@ -752,7 +752,7 @@ def filter(self, func, dropna: bool = True, *args, **kwargs):
See Also
--------
Series.filter: Filter elements of ungrouped Series.
DataFrameGroupBy.filter : Filter elements from groups base on criterion.
DataFrameGroupBy.filter : Filter groups base on criterion.

Notes
-----
Expand Down Expand Up @@ -2335,9 +2335,9 @@ def _choose_path(self, fast_path: Callable, slow_path: Callable, group: DataFram

def filter(self, func, dropna: bool = True, *args, **kwargs) -> DataFrame:
"""
Filter elements from groups that don't satisfy a criterion.
Filter groups that don't satisfy a criterion.

Elements from groups are filtered if they do not satisfy the
Groups are filtered if they do not satisfy the
boolean criterion specified by func.

Parameters
Expand All @@ -2360,7 +2360,7 @@ def filter(self, func, dropna: bool = True, *args, **kwargs) -> DataFrame:
See Also
--------
DataFrame.filter: Filter elements of ungrouped DataFrame.
SeriesGroupBy.filter : Filter elements from groups base on criterion.
SeriesGroupBy.filter : Filter groups based on criterion.

Notes
-----
Expand Down
Loading