Skip to content

Conversation

@jbrockmendel
Copy link
Member

This will in turn allow for simplification for other code that has built up kludges around MultiIndex.get_value's behavior


# passed lambda
for t in cases:
for i, t in enumerate(cases):
Copy link
Member

Choose a reason for hiding this comment

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

Why? Where is this i used?

Copy link
Member Author

Choose a reason for hiding this comment

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

this was in debugging, thought i had reverted it, thanks for pointing it out

# We have to explicitly exclude generators, as these are hashable.
raise InvalidIndexError(key)

def _try_mi(k):
Copy link
Contributor

Choose a reason for hiding this comment

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

should think about making try_mi non-nested (just for cleanliness), give it a better name and type in the future.

Copy link
Member Author

Choose a reason for hiding this comment

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

yah there's plenty more to do here, but this is a big step

@jreback jreback added Clean Indexing Related to indexing on series/frames, not to indexes themselves MultiIndex labels Feb 5, 2020
@jreback jreback added this to the 1.1 milestone Feb 5, 2020
@jreback jreback merged commit a1e0752 into pandas-dev:master Feb 5, 2020
@jbrockmendel jbrockmendel deleted the mi-indexing branch February 5, 2020 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Clean Indexing Related to indexing on series/frames, not to indexes themselves MultiIndex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants