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 89b2e53 commit 74ebfabCopy full SHA for 74ebfab
modin/data_management/functions/groupby_function.py
@@ -77,8 +77,11 @@ def reduce(
77
drop=False,
78
**kwargs,
79
):
80
- by_part = list(df.index.names)
81
- if drop and len(df.columns.intersection(pandas.Index(by_part))) > 0:
+ # Wrapping names into an Index should be unnecessary, however
+ # there is a bug in pandas with intersection that forces us to do so:
82
+ # https://github.com/pandas-dev/pandas/issues/39699
83
+ by_part = pandas.Index(df.index.names)
84
+ if drop and len(df.columns.intersection(by_part)) > 0:
85
df.drop(columns=by_part, errors="ignore", inplace=True)
86
87
groupby_args = groupby_args.copy()
0 commit comments