Is there a pandas built-in way to apply two different aggregating functions f1, f2 to the same column df[\"returns\"], without having to call
f1, f2
df[\"returns\"]
Would something like this work:
In [7]: df.groupby('dummy').returns.agg({'func1' : lambda x: x.sum(), 'func2' : lambda x: x.prod()}) Out[7]: func2 func1 dummy 1 -4.263768e-16 -0.188565