diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py index b4c00b66ed8..10bf1466156 100644 --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -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: