Skip to content

REGR: 1.3 behavior change with groupby and asindex=False #41998

Closed
@aberres

Description

@aberres

Code Sample, a copy-pastable example

pd.DataFrame(columns=["date", "crew_member_id"])
    .groupby(["date", "crew_member_id"], as_index=False)
    .sum()

Problem description

With 1.3rc1 this fails with ValueError: Length of values (0) does not match length of index (1) while 1.2 returns and empty frame.

Expected Output

If this is the expected behavior fine. Just wanted to ensure that it is not an accidental regression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GroupbyRegressionFunctionality that used to work in a prior pandas version

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions