Skip to content

User-facing AssertionError with groupby on list of empty list. #5289

Closed
@jtratner

Description

@jtratner

I hesitate to post this, but grouping on a list of empty list yields an AssertionError. It's so edge case I'm not sure it's worth bring up though:

df = pd.DataFrame(zip(range(10), range(10)), columns=['apple', 'b'])
df.groupby([[]])
# Long traceback yields: AssertionError: Grouper and axis must be same length

Came from this SO issue (but it's really only related because of the error message) - http://stackoverflow.com/questions/19483991/how-to-make-grouper-and-axis-the-same-length

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions