-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: DTI.intersection with DST transition #48167
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
BUG: DTI.intersection with DST transition #48167
Conversation
pandas/core/indexes/datetimes.py
Outdated
if self.tz is not None and not timezones.is_utc(self.tz): | ||
return False | ||
other_tz = getattr(other, "tz", None) | ||
if other_tz is not None and not timezones.is_utc(other_tz): |
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.
fine if you want to do quick fix, but could also include fixed-offset tzs. also i think we're assured matching types/dtypes at this point
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.
Added a check for not timezones.is_fixed_offset
.
Yeah I think a more complete check would be to add a .fold
attribute and then check self.fold.nunique > 1
. That would allow some DatetimeIndex
es to still use the distpatch to range ops. #47130
…ansition) (#48189) Backport PR #48167: BUG: DTI.intersection with DST transition Co-authored-by: Matthew Roeschke <[email protected]>
* BUG: DTI.intersection with DST transition * Add whatsnew note * Add fixed offset as well
DatetimeIndex.intersection
not working for localized indices #46702 (Replace xxxx with the Github issue number)doc/source/whatsnew/v1.4.4.rst
file if fixing a bug or adding a new feature.