DataFrames can calculate aggregations on columns. Aggregation functions such as mean, max, min, and std are available.
Using the same DataFrame from before,
import pandas as pd df = pd.DataFrame({'name': ['Jeff', 'Esha', 'Jia'], 'age': [30, 56, 8]})
| name | age | |
|---|---|---|
| 1 | Jeff | 30 |
| 2 | Esha | 56 |
| 3 | Jia | 8 |
What is the minimum value of age? Define a variable min_age with the value of df.age.min() would output.