We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cca9468 commit 13395f0Copy full SHA for 13395f0
modin/core/dataframe/algebra/groupby.py
@@ -133,6 +133,12 @@ def map(
133
axis=1,
134
)
135
other = list(other.columns)
136
+ # GH#4522: Vile as this may be, it is necessary to avoid the case where we are
137
+ # grouping by columns that were recently added to the data via
138
+ # `from_labels`. The internal dataframe doesn't know what to do when
139
+ # the label matches a column name.
140
+ if len(df.columns.intersection(df.index.names)) > 0:
141
+ df = df.reset_index(drop=True)
142
by_part = other
143
else:
144
by_part = by
0 commit comments