bigframes.pandas.DataFrame.aggregate#
- DataFrame.aggregate(func) DataFrame | Series#
Aggregate using one or more operations over columns.
Examples:
>>> df = bpd.DataFrame({"A": [3, 1, 2], "B": [1, 2, 3]}) >>> df A B 0 3 1 1 1 2 2 2 3 [3 rows x 2 columns]
Using a single function:
>>> df.agg('sum') A 6 B 6 dtype: Int64
Using a list of functions:
>>> df.agg(['sum', 'mean']) A B sum 6.0 6.0 mean 2.0 2.0 [2 rows x 2 columns]
- Parameters:
func (function) – Function to use for aggregating the data. Accepted combinations are: string function name, list of function names, e.g.
['sum', 'mean'].- Returns:
Aggregated results.
- Return type: