-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DEPR: Enforce deprecations in indexes/datetimes.py #49607
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
Conversation
doc/source/whatsnew/v2.0.0.rst
Outdated
@@ -433,9 +433,11 @@ Removal of prior version deprecations/changes | |||
- Remove :meth:`DataFrameGroupBy.pad` and :meth:`DataFrameGroupBy.backfill` (:issue:`45076`) | |||
- Remove ``numpy`` argument from :func:`read_json` (:issue:`30636`) | |||
- Disallow passing abbreviations for ``orient`` in :meth:`DataFrame.to_dict` (:issue:`32516`) | |||
- Disallow partial slicing on an unordered :class:`DatetimeIndex` with keys, which are not in Index. This now raises a ``KeyError`` (:issue:`18531`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"keys, which are not in Index" -> "keys which are not in the Index"?
"unordered" -> "non-monotonic"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Updated + greenish
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
thanks @mroeschke |
* DEPR: date_range(closed) * Disallow partial slicing of missing * Review + failed test
* DEPR: date_range(closed) * Disallow partial slicing of missing * Review + failed test
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.
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.
* 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
Introduced in #43504, #37819