Skip to content
forked from pydata/xarray

Commit

Permalink
Fix dropping of muiltiindexes
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Mar 16, 2024
1 parent fbcac76 commit 267a17d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -5867,7 +5867,7 @@ def drop_vars(
for var in names_set:
maybe_midx = self._indexes.get(var, None)
if isinstance(maybe_midx, PandasMultiIndex):
idx_coord_names = set(maybe_midx.index.names + [maybe_midx.dim])
idx_coord_names = set(list(maybe_midx.index.names) + [maybe_midx.dim])
idx_other_names = idx_coord_names - set(names_set)
other_names.update(idx_other_names)
if other_names:
Expand Down

0 comments on commit 267a17d

Please sign in to comment.