When using df.mean() I get a result where the mean for each column is given. Now let\'s say I want the mean of the first column, and the sum of the second. Is t
df.mean()
I think you can use the agg method with a dictionary as the argument. For example:
agg
df = pd.DataFrame({'A': [0, 1, 2], 'B': [3, 4, 5]}) df = A B 0 0 3 1 1 4 2 2 5 df.agg({'A': 'mean', 'B': sum}) A 1.0 B 12.0 dtype: float64