Skip to content

Conversation

@jbrockmendel
Copy link
Member

Could alleviate some confusion, but could also be an annoyance. Not a strong opinion here.

Comment on lines +113 to +114
if not index._is_multi:
original_name, index.name = index.name, "foo"
Copy link
Member

Choose a reason for hiding this comment

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

Test names for a MultiIndex? Also in the other tests in the diff.

.set_index(TimedeltaIndex([]), append=True)[expected_columns]
)
if len(keys) == 1:
if len(keys) == 1 and not expected.index._is_multi:
Copy link
Member

Choose a reason for hiding this comment

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

It looks like expected.index is always a MultIndex here.

expected["date"] = pd.to_datetime(expected["date"])
expected = expected.set_index("date", append=True, drop=True)[expected_columns]
if len(keys) == 1:
if len(keys) == 1 and not expected.index._is_multi:
Copy link
Member

Choose a reason for hiding this comment

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

Ditto.

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: MultiIndex.set_names loses name

2 participants