Table Of Contents


Enter search terms or a module, class or function name.


Series.agg(func, axis=0, *args, **kwargs)[source]

Aggregate using one or more operations over the specified axis.

New in version 0.20.0.


func : function, string, dictionary, or list of string/functions

Function to use for aggregating the data. If a function, must either work when passed a Series or when passed to Series.apply. For a DataFrame, can pass a dict, if the keys are DataFrame column names.

Accepted combinations are:

  • string function name.
  • function.
  • list of functions.
  • dict of column names -> functions (or list of functions).

axis : {0 or ‘index’}

Parameter needed for compatibility with DataFrame.


Positional arguments to pass to func.


Keyword arguments to pass to func.

aggregated : Series


agg is an alias for aggregate. Use the alias.

A passed user-defined-function will be passed a Series for evaluation.


>>> s = Series(np.random.randn(10))
>>> s.agg('min')
>>> s.agg(['min', 'max'])
min   -1.301805
max    1.127688
dtype: float64
Scroll To Top