-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
API: DatetimeIndex union vs join different behavior with mismatched tzs #39328
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
Comments
This is a bit related to #37605 ? If we decide there (for setitem) that matching tzawareness (but not tz-equality) is enough, then I would expect also both |
One way to implement this would be to make
In both of these examples, its pretty reasonable to think the user would want the object-dtype result |
I think for those two cases you bring up, it makes sense to have UTC tz-aware as output (AFAIU that's also what the original reporter wanted in #27496) |
For union when we have mismatched tzs or mismatched tzawareness, we cast to object.
For join when we have mismatched tzawareness we raise TypeError, with mismatched tzs we cast to UTC.
It would be convenient if these had the same behavior.
The text was updated successfully, but these errors were encountered: