Table Of Contents

Search

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

pandas.Series.aggregate

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

Aggregate using input function or dict of {column -> function}

New in version 0.20.0.

Parameters:

func : callable, string, dictionary, or list of string/callables

Function to use for aggregating the data. If a function, must either work when passed a DataFrame or when passed to DataFrame.apply. If passed a dict, the keys must be DataFrame column names.

Accepted Combinations are: - string function name - function - list of functions - dict of column names -> functions (or list of functions)

Returns:

aggregated : Series

Notes

Numpy functions mean/median/prod/sum/std/var are special cased so the default behavior is applying the function along axis=0 (e.g., np.mean(arr_2d, axis=0)) as opposed to mimicking the default Numpy behavior (e.g., np.mean(arr_2d)).

Scroll To Top