-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DEPR: DatetimeIndex indexing with mismatched tzawareness #49492
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
@@ -302,6 +302,7 @@ Removal of prior version deprecations/changes | |||
- Changed behavior of empty data passed into :class:`Series`; the default dtype will be ``object`` instead of ``float64`` (:issue:`29405`) | |||
- Changed the behavior of :meth:`DatetimeIndex.union`, :meth:`DatetimeIndex.intersection`, and :meth:`DatetimeIndex.symmetric_difference` with mismatched timezones to convert to UTC instead of casting to object dtype (:issue:`39328`) | |||
- Changed the behavior of :func:`to_datetime` with argument "now" with ``utc=False`` to match ``Timestamp("now")`` (:issue:`18705`) | |||
- Changed the behavior of indexing on a timezone-aware :class:`DatetimeIndex` with a timezone-naive ``datetime`` object or vice-versa; these now behave like any other non-comparable type (:issue:`36148`) |
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.
Might be good to clarify behave like any other non-comparable type
means raising a KeyError
?
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.
good idea, updated
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.
Looks good. Just a merge conflict
Thanks @jbrockmendel |
…49492) * DEPR: DatetimeIndex indexing with mismatched tzawareness * clarify whatsnew
…49492) * DEPR: DatetimeIndex indexing with mismatched tzawareness * clarify whatsnew
Comparison of tz-naive and tz-aware datetime-like objects has been removed in Pandas 2.0. See: pandas-dev/pandas#49492 Signed-off-by: Julien Jerphanion <[email protected]>
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.