Skip to content

Improve MultiIndex label rename checks #61769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TabLand
Copy link

@TabLand TabLand commented Jul 3, 2025

@TabLand TabLand force-pushed the correct-multi-index-rename-checks branch from d700c92 to 6b7cba3 Compare July 3, 2025 19:53
@TabLand TabLand marked this pull request as ready for review July 5, 2025 10:56
Comment on lines +1054 to +1058
indexers = [
ax.get_level_values(i).get_indexer_for([replacement])
for i in range(ax.nlevels)
if i == level or level is None
]
Copy link
Member

@mroeschke mroeschke Jul 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think MultiIndex.get_indexer_for should work with for an iterable of tuples, so I would look into why that isn't working as opposed to working around it here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Pandas column rename function now working for multilevel columns
2 participants