pandas.Series.agg

pandas 3.1.1 · Series and accessors · method

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

Call syntax

Series.agg(func=None, axis=0, *args, **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 or dict

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

axis Optional
Positional or keyword
Default 0
{0 or 'index'}

Choose which axis the operation acts on. The accepted axis labels depend on the receiver.

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

Returns

scalar, Series or DataFrame