Skip to content

reset_index followed by groupby causes exception in some cases #4522

@devin-petersohn

Description

@devin-petersohn

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): windows
  • Modin version (modin.__version__): latest
  • Python version: 3.8
  • Code we can use to reproduce:
import modin.pandas as pd

df = pd.read_csv("some.csv", index_col=[0,1,2])
df.reset_index().groupby(df.columns[:1]).count()  # error

Describe the problem

This only happens in a very corner case: when groupby by parameter contains 2 or more columns added from the reset_index call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Minor bugs or low-priority feature requestsbug 🦗Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions