Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Chigarev <dmitry.chigarev@intel.com>
  • Loading branch information
dchigarev committed Apr 2, 2024
1 parent cc0a66b commit 7c752d5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions modin/core/storage_formats/pandas/query_compiler.py
Original file line number Diff line number Diff line change
@@ -1071,9 +1071,15 @@ def map_func(df, resample_kwargs=resample_kwargs): # pragma: no cover
if isinstance(df.index, pandas.MultiIndex):
level_to_keep = resample_kwargs["level"]
if isinstance(level_to_keep, int):
to_drop = [lvl for lvl in range(df.index.nlevels) if lvl != level_to_keep]
to_drop = [
lvl
for lvl in range(df.index.nlevels)
if lvl != level_to_keep
]
else:
to_drop = [lvl for lvl in df.index.names if lvl != level_to_keep]
to_drop = [
lvl for lvl in df.index.names if lvl != level_to_keep
]
df.index = df.index.droplevel(to_drop)
resample_kwargs = resample_kwargs.copy()
resample_kwargs["level"] = None

0 comments on commit 7c752d5

Please sign in to comment.