-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Description
Recreation:
In [2]: paste
In [357]: df = DataFrame({'A' : ['foo', 'bar', 'foo', 'bar',
.....: 'foo', 'bar', 'foo', 'foo'],
.....: 'B' : ['one', 'one', 'two', 'three',
.....: 'two', 'two', 'one', 'three'],
.....: 'C' : randn(8), 'D' : randn(8)})
## -- End pasted text --
In [3]: grouped = df.groupby(['A', 'B'], as_index=False)
In [4]: x = grouped['C'].agg({ 'Q' : np.sum})