Skip to content

TYP: indexes #37224

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

Merged
merged 14 commits into from
Oct 29, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
revert
  • Loading branch information
jbrockmendel committed Oct 24, 2020
commit 96ed502a3eb9c7ba81bcc1c6d3ed2bf8e42cbe73
5 changes: 1 addition & 4 deletions pandas/core/indexes/datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
from pandas.core.tools.timedeltas import to_timedelta

if TYPE_CHECKING:
from pandas import CategoricalIndex, DatetimeIndex
from pandas import CategoricalIndex

_index_doc_kwargs = dict(ibase._index_doc_kwargs)

Expand Down Expand Up @@ -944,9 +944,6 @@ def _maybe_utc_convert(self, other):
raise TypeError("Cannot join tz-naive with tz-aware DatetimeIndex")

if not timezones.tz_compare(self.tz, other.tz):
self = cast("DatetimeIndex", self)
other = cast("DatetimeIndex", other)

this = self.tz_convert("UTC")
other = other.tz_convert("UTC")
return this, other
Expand Down