human
Python Pandas: Multiple aggregations of the same column
assistant
Here is some code to apply two different aggregating functions `mean` and `sum` to the same column `dummy` in pandas data frame `df`

df.groupby('dummy').agg({'returns': [np.mean, np.sum]})

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.