Skip to content

Bug in groupby when as_index=False #819

@adamklein

Description

@adamklein

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions