| [ Web Proxy ] |
| Viewing: https://dataframes.bigquery.dev/reference/api/bigframes.pandas.DataFrame.aggregate.html | [Back] [Original] |
Section Navigation
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]
func (function) Function to use for aggregating the data.
Accepted combinations are: string function name, list of
function names, e.g. ['sum', 'mean'].
Aggregated results.
Copyright 2019, Google.
Created using Sphinx 8.1.3.
Built with the PyData Sphinx Theme 0.19.0.
| Web Proxy Viewer | New URL | Original Page |