Skip to content

REF: do remove DTI._convert_arr_indexer #41803

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 4 commits into from
Jun 4, 2021

Conversation

jbrockmendel
Copy link
Member

Motivation: get rid of _convert_listlike_indexer, _convert_arr_indexer, _convert_list_indexer. These are just convoluted bits of casting before a (inefficient-because-repeated) call to get_indexer.

This moves the relevant casting for the DTI/TDI/PI case directly into get_indexer, mirroring how get_loc works for these subclasses.

Upcoming PR does analogous thing for IntervalIndex and CategoricalIndex. MultiIndex is the last one, haven't landed on a solution there.

cc @phofl

@jreback
Copy link
Contributor

jreback commented Jun 3, 2021

can you rebase

@jreback jreback added Index Related to the Index class or subclasses Refactor Internal refactoring of code labels Jun 3, 2021
@jbrockmendel
Copy link
Member Author

rebased + green

@jreback jreback added this to the 1.3 milestone Jun 4, 2021
@jreback
Copy link
Contributor

jreback commented Jun 4, 2021

hmm how does this improve things?

@jbrockmendel
Copy link
Member Author

hmm how does this improve things?

The goal is to get rid of convert_listlike_indexer entirely. After this, its only a MultiIndex thing

@jreback jreback merged commit ad58cf6 into pandas-dev:master Jun 4, 2021
@jbrockmendel jbrockmendel deleted the ref-get_indexer-2 branch June 4, 2021 16:15
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Index Related to the Index class or subclasses Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants