We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3aa23ed commit cdf3013Copy full SHA for cdf3013
pandas/core/generic.py
@@ -1147,11 +1147,11 @@ def rename(
1147
1148
# GH 13473
1149
if not callable(replacements):
1150
- if ax._is_multi:
+ if ax._is_multi and level is not None:
1151
indexer = ax.get_level_values(level).get_indexer_for(replacements)
1152
else:
1153
indexer = ax.get_indexer_for(replacements)
1154
-
+
1155
if errors == "raise" and len(indexer[indexer == -1]):
1156
missing_labels = [
1157
label
0 commit comments