Skip to content

Conversation

@deniskrds
Copy link
Contributor

Continues work from #62175 after the original author stepped back.

Index.get_level_values() was mishandling several edge cases:

  • Boolean names (True/False) were treated as integers
  • NA-like names (np.nan, pd.NA, pd.NaT) failed equality comparison
  • Integer names conflicted with positional level access

This PR fixes the validation logic to handle these cases correctly.

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: Index.get_level_values() does not handle boolean, pd.NA, np.nan, or pd.NaT level correctly

1 participant