DataFrame.
aggregate
Aggregate using one or more operations over the specified axis.
Function to use for aggregating the data. If a function, must either work when passed a %(klass)s or when passed to %(klass)s.apply.
Accepted combinations are:
[np.sum, 'mean']
Currently, we only support ['count', 'mad', 'max', 'mean', 'median', 'min', 'mode', 'quantile', 'rank', 'sem', 'skew', 'sum', 'std', 'var']
['count', 'mad', 'max', 'mean', 'median', 'min', 'mode', 'quantile', 'rank', 'sem', 'skew', 'sum', 'std', 'var']
Currently, we only support axis=0 (index)
Positional arguments to pass to func
Keyword arguments to pass to func
if DataFrame.agg is called with a single function, returns a Series if DataFrame.agg is called with several functions, returns a DataFrame if Series.agg is called with single function, returns a scalar if Series.agg is called with several functions, returns a Series
See also
Examples
>>> df = ed.DataFrame('localhost', 'flights') >>> df[['DistanceKilometers', 'AvgTicketPrice']].aggregate(['sum', 'min', 'std']) DistanceKilometers AvgTicketPrice sum 9.261629e+07 8.204365e+06 min 0.000000e+00 1.000205e+02 std 4.578263e+03 2.663867e+02