Skip to content

REF: call _maybe_cast_indexer upfront, better exception messages #31638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 5, 2020

Conversation

jbrockmendel
Copy link
Member

This will actually allow us to remove e.g. CategoricalIndex.get_loc by moving the 2 relevant lines into CategoricalIndex._maybe_cast_indexer. Large parts of DTI/TDI/PI.get_loc will also be simplifiable.

We've got both Index._maybe_cast_indexer and Index._convert_scalar_indexer which hopefully we'll only need one of.

@jbrockmendel jbrockmendel added the Indexing Related to indexing on series/frames, not to indexes themselves label Feb 4, 2020
@jreback jreback added this to the 1.1 milestone Feb 5, 2020
@jreback jreback merged commit f5409cb into pandas-dev:master Feb 5, 2020
@jreback
Copy link
Contributor

jreback commented Feb 5, 2020

sure

@jbrockmendel jbrockmendel deleted the get_loc-msg branch February 5, 2020 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants