Skip to content

Series.reset_index does not consider 'name' parameter #1457

@isilopekel

Description

@isilopekel

System information

  • OS Platform and Distribution: Linux Ubuntu 16.04
  • Modin version : 0.7.3
  • Python version: 3.6.7
  • Code we can use to reproduce:
Create dummy.csv with following content: 
a,b,c,
1,2,3
4,5,6

if __name__ == "__main__":
    import modin.pandas as mpd
    df=mpd.read_csv("dummy.csv", sep=",")
    df_count = df.groupby(["a", "b"]).size().reset_index(name="Count")
    print(df_count.columns)

    import pandas as pd
    df=pd.read_csv("dummy.csv", sep=",")
    df_count = df.groupby(["a", "b"]).size().reset_index(name="Count")
    print(df_count.columns)

Describe the problem

Multi-column grouping loses the column names. Output of the code snippet:
Index(['level_0', 'level_1', 'Count'], dtype='object')
Index(['a', 'b', 'Count'], dtype='object')

Metadata

Metadata

Assignees

Labels

bug 🦗Something isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions