pandas.api.typing.SeriesGroupBy.filter

pandas 3.1.1 · GroupBy · method

Select by labels on a DataFrame or Series. On GroupBy keep groups passing a boolean callable.

Call syntax

pd.api.typing.SeriesGroupBy.filter(func, dropna=True, *args, **kwargs)

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
func Required
Positional or keyword
function

Supply a supported operation name or a callable, depending on this API.

dropna Optional
Positional or keyword
Default True
bool

Choose whether to drop missing values or missing keys from consideration.

*args Optional
Additional positional arguments
**kwargs Optional
Additional keyword arguments

Returns

Series