pandas.api.typing.DataFrameGroupBy.agg

pandas 3.1.1 · GroupBy · method

Summarize values with named operations or callables. The result shape depends on the operations and object.

Call syntax

pd.api.typing.DataFrameGroupBy.agg(func=None, *args, engine=None, engine_kwargs=None, **kwargs)

Run the example

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

Parameters

ParameterRequirementAccepted values and behavior
func Optional
Positional or keyword
Default None
function, str, list, dict or None

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

*args Optional
Additional positional arguments
engine Optional
Keyword only
Default None
str

Choose the implementation that performs the operation.

engine_kwargs Optional
Keyword only
Default None
dict

Pass a dictionary of options to the selected engine.

**kwargs Optional
Additional keyword arguments

Returns

DataFrame