Examples
import numpy as np
import pandas as pd
df = pd.DataFrame([[2, 3, 4],
[5, 6, 7],
[8, 9, 10],
[np.nan, np.nan, np.nan]],
columns=['P', 'Q', 'R'])
Aggregate these functions over the rows.
df.agg(['sum', 'min'])
Different aggregations per column.
df.agg({'P' : ['sum', 'min'], 'Q' : ['min', 'max']})
Aggregate over the columns.
df.agg("mean", axis="columns")