-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
API DesignDeprecateFunctionality to remove in pandasFunctionality to remove in pandasMultiIndexNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further action
Milestone
Description
The boat may have long sailed on this, but just for consideration.
I semi-frequently get the .levels
and .labels
of a MultiIndex
backwards. Maybe it's just me, but I think labels
is the culprit, because in other pandas contexts, "labels" refer to the actual value of the thing. E.g.
.loc
indexes by "labels" (values)- the values inside of a single row index or columns are the "labels" for those items
So, consistent with Categorical
, would it make sense for the integer mapping inside a MultiIndex
to also be called .codes
?
Metadata
Metadata
Assignees
Labels
API DesignDeprecateFunctionality to remove in pandasFunctionality to remove in pandasMultiIndexNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further action