I'm referring to this post where one custom lambda function is applied to one specific column during the aggregate step while grouping.
In [67]: f = {'A':['sum','mean'], 'B':['prod'], 'D': lambda g: df.ix[g.index].E.sum()}
In [69]: df.groupby('GRP').agg(f)
Out[69]:
            A                   B         D
          sum      mean      prod  <lambda>
GRP
0    0.719580  0.359790  0.102004  1.170219
1    0.454824  0.227412  0.034060  1.182901
I'm interested if this is possible without specifying column A and B explicitly. I'm looking for a way where a standard method like sum or mean is applied to all columns except column D and the custom lambda function is applied to column D only.
Something like this:
f = {'sum', 'D': lambda g: df.ix[g.index].E.sum()}
 
    