Skip to content
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

DEPR: DatetimeIndex indexing with mismatched tzawareness #49492

Merged
merged 4 commits into from Nov 7, 2022

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@mroeschke mroeschke added the Deprecate Functionality to remove in pandas label Nov 3, 2022
@@ -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`)
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, updated

Copy link
Member

@mroeschke mroeschke left a 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

@mroeschke mroeschke added this to the 2.0 milestone Nov 7, 2022
@mroeschke mroeschke merged commit bb7dd2c into pandas-dev:main Nov 7, 2022
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the depr-tz-mismatch branch November 7, 2022 23:15
phofl pushed a commit to phofl/pandas that referenced this pull request Nov 9, 2022
…49492)

* DEPR: DatetimeIndex indexing with mismatched tzawareness

* clarify whatsnew
noatamir pushed a commit to noatamir/pandas that referenced this pull request Nov 9, 2022
…49492)

* DEPR: DatetimeIndex indexing with mismatched tzawareness

* clarify whatsnew
jjerphan added a commit to man-group/ArcticDB that referenced this pull request Jul 11, 2023
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 <git@jjerphan.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants