You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perhaps this is me misunderstanding the way Pandas handles indices for related objects behind the scenes, but I found the following behavior very unintuitive:
Would it make sense to say somewhere in the docs that the .unique() method can be run on the kind of data you get back from calling the .get_level_values(levelname) method?
.get_level_values() returns an Index, and unique() is a method of an Index. So I would expect this to be natural. if you think its unclear, pls submit a pull-request for a doc update.
Perhaps this is me misunderstanding the way Pandas handles indices for related objects behind the scenes, but I found the following behavior very unintuitive:
This returns:
rather than the expected
I could get the results I expected by running
but could someone explain why the behavior I'm seeing above with
DataFrame.index.levels
is an appropriate result rather than a bug?The text was updated successfully, but these errors were encountered: