Skip to content

Groupby all levels except the specified ones #15475

Closed
@harisbal

Description

@harisbal

Inspired by

http://stackoverflow.com/questions/25606478/grouping-by-everything-except-for-one-index-column-in-pandas

I was thinking if it would be useful to add a parameter to the groupby function (e.g. allbut=True) so that pandas will group all levels except the specified ones) .

I suggest so because in a multilevel index with several levels, eliminating just one level requires a quite verbose approach

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions