Skip to content

BUG: MultiIndex.set_names loses name #11979

@TomAugspurger

Description

@TomAugspurger

Seems surprising, I thought .name would come along.

In [31]: idx = pd.MultiIndex.from_product([['A'], ['a', 'b', 'c']])

In [32]: idx.name = 'foo'

In [33]: idx2 = idx.set_names(['l1', 'l2'])

In [34]: idx2.name

Bug, or user error since MultiIndex.name isn't all that useful?

Metadata

Metadata

Assignees

Labels

BugDeprecateFunctionality to remove in pandasMultiIndexNeeds DiscussionRequires discussion from core team before further action

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions