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 }})

phofl

@phofl

@phofl phofl added Deprecate

Functionality to remove in pandas

Indexing

Related to indexing on series/frames, not to indexes themselves

labels

Nov 13, 2020

@phofl phofl mentioned this pull request

Nov 13, 2020

5 tasks

@jreback

@phofl phofl deleted the 18531_deprecation branch

November 15, 2020 17:41

@phofl phofl mentioned this pull request

Jan 4, 2021

5 tasks

wence- added a commit to wence-/pandas that referenced this pull request

Jul 5, 2023

@wence-

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

Jul 5, 2023

@wence-

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

Jul 19, 2023

@wence-

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.

Labels

Deprecate

Functionality to remove in pandas

Indexing

Related to indexing on series/frames, not to indexes themselves

2 participants

@phofl @jreback