Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Commit

Permalink
small simplification of rename from pydata#3532 (pydata#3539)
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty authored and dcherian committed Nov 16, 2019
1 parent 56c16e4 commit 9755e3f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2657,13 +2657,7 @@ def _rename_indexes(self, name_dict, dims_set):
continue
if isinstance(v, pd.MultiIndex):
new_names = [name_dict.get(k, k) for k in v.names]
index = pd.MultiIndex(
v.levels,
v.labels,
v.sortorder,
names=new_names,
verify_integrity=False,
)
index = v.rename(names=new_names)
else:
index = v.rename(new_name)
indexes[new_name] = index
Expand Down

0 comments on commit 9755e3f

Please sign in to comment.