wesm/pandas — Issue #677: Feature request: allow multiple arguments in aggregate
Author: twiecki
Created: 2012-01-24 16:46:18+00:00
State: open

The aggregation function is very powerful. I think it would be even better if one could define functions that work on multiple columns, e.g.:

df.groupby('A').agg({('C', 'D'): lambda x, y: (x-y)**2})

Which would call the lambda function with row pairs of C and D for x and y, respectively. Obviously a toy example.

Apologies if this already works in some way I am not familiar with.