diff --git a/modin/backends/base/query_compiler.py b/modin/backends/base/query_compiler.py index 980f7ac2467..06b74d43e3a 100644 --- a/modin/backends/base/query_compiler.py +++ b/modin/backends/base/query_compiler.py @@ -1412,8 +1412,6 @@ def groupby_agg( by = by.columns[0] if drop else by.to_pandas().squeeze() elif isinstance(by, type(self)): by = list(by.columns) - else: - by = by else: by = by.to_pandas().squeeze() if isinstance(by, type(self)) else by