Deprecate partial slicing of unordered DatetimeIndex when both keys are not present by phofl · Pull Request #37819 · 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
Conversation1 Commits1 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 }})
Functionality to remove in pandas
Related to indexing on series/frames, not to indexes themselves
labels
phofl mentioned this pull request
5 tasks
phofl deleted the 18531_deprecation branch
phofl mentioned this pull request
5 tasks
wence- added a commit to wence-/pandas that referenced this pull request
The intention of pandas-dev#37819 was to deprecate (removed in pandas-dev#49607) the special case behaviour of non-monotonic datetime indexes, so that if either slice bound is not in the index, a KeyError is raised.
However, the check only fired correctly for the case where the lower bound was not in the index and either the upper bound was None or it was also not in the index.
Correct the logic here and adapt the one test that exercises this behaviour.
Closes pandas-dev#53983.
wence- added a commit to wence-/pandas that referenced this pull request
The intention of pandas-dev#37819 was to deprecate (removed in pandas-dev#49607) the special case behaviour of non-monotonic datetime indexes, so that if either slice bound is not in the index, a KeyError is raised.
However, the check only fired correctly for the case where the lower bound was not in the index and either the upper bound was None or it was also not in the index.
Correct the logic here and adapt the one test that exercises this behaviour.
Closes pandas-dev#53983.
mroeschke pushed a commit that referenced this pull request
- Correct check when slicing non-monotonic datetime indexes
The intention of #37819 was to deprecate (removed in #49607) the special case behaviour of non-monotonic datetime indexes, so that if either slice bound is not in the index, a KeyError is raised.
However, the check only fired correctly for the case where the lower bound was not in the index and either the upper bound was None or it was also not in the index.
Correct the logic here and adapt the one test that exercises this behaviour.
Closes #53983.
Modify more tests for updated behaviour
Added whatsnew entry as bugfix
Labels
Functionality to remove in pandas
Related to indexing on series/frames, not to indexes themselves
2 participants