Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding columns in groupby #2112

Closed
wesm opened this issue Oct 24, 2012 · 1 comment
Closed

Adding columns in groupby #2112

wesm opened this issue Oct 24, 2012 · 1 comment

Comments

@wesm
Copy link
Member

wesm commented Oct 24, 2012

Possible to simplify?

xref http://stackoverflow.com/questions/12389898/python-pandas-how-to-add-a-totally-new-column-to-a-data-frame-inside-of-a-group

@jorisvandenbossche jorisvandenbossche modified the milestones: Someday, No action Jul 6, 2018
@jreback jreback modified the milestones: No action, Someday Jul 8, 2018
@jreback jreback added the Groupby label Jul 8, 2018
@rhshadrach
Copy link
Member

The SO posts are adding columns to the DataFrame in groupby(...).apply and groupby(...).transform. In general, mutating a container while iterating over it invalidates the iterators, this shouldn't be allowed, similar to #12653.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants