pydata/pandas — Issue #819: Bug in groupby when as_index=False
Author: adamklein
Created: 2012-02-23 16:28:07+00:00
State: open
Labels: Bug, prio-high

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})