DEPR: Index.get_loc with method by jbrockmendel · Pull Request #42269 · pandas-dev/pandas (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation4 Commits4 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
- closes #xxxx
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
We only use it one place internally; this will allow us to simplify get_loc, which will marginally improve perf.
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request
We can probably work around it, but just as a heads up, this is also used externally in Xarray in a pretty extensively used code path (#5721).
Is it correct that the tolerance
argument will also need to be removed as part of this? I think the tolerence
is only relevant to inexact methods. The tolerance
argument is not currently marked as deprecated, but maybe its implicit given the relationship?
Is it correct that the tolerance argument will also need to be removed as part of this? I
yes.
trying to enforce this I found that for DatetimeIndex cases the alternative get_indexer([key], ...)
doesn't work because get_loc does string parsing that get_indexer doesn't.
I'd be OK with either a) requiring users to do the parsing themselves before calling get_indexer or b) reverting this deprecation.
huard mentioned this pull request
Labels
Functionality to remove in pandas
Related to indexing on series/frames, not to indexes themselves