You can see examples of the AGGREGATE function below:
python code for the AGGREGATE function
Name | Age | Height | Weight |
Olivia | 25 | 210 | 180 |
Noah | 25 | 205 | 235 |
Oliver | 27 | 195 | 205 |
Elijah | 22 | 198 | 185 |
James | 29 | 199 | 231 |
William | 29 | 201 | 240 |
Benjamin | 21 | 202 | 235 |
Lucas | 25 | 200 | 238 |
Henry | 22 | 204 | 190 |
import pandas as pd
df =pd.read_csv("example.csv")
out=df.aggregate({"Height":['max', 'min'],"Age":['max', 'min'],"Weight":['min', 'max']})
print(out)
Height Age Weight
max 210 29 240
min 195 21 180
AGGREGATE function
The AGGREGATE function is one of the math functions of Excel.
This function has multiple argument lists.
AGGREGATE arguments
This function has just 1 Argument:
The argument of AGGREGATE function is number.
Function_num is the number 1 to 19 that specifies the summary function for the aggregate.
The argument of AGGREGATE function is required and not optional.
AGGREGATE(number) = number