-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
API: Series.values with tz-aware should return object array of Timestamps #15750
Comments
cc @sdementen |
going to put a PR soon to fix this. |
I am not sure this is worth changing again before pandas 2.0. True, the current output of I agree that roundtripping is not preserved, but is that so important? To quote from the original PR adding tz datetime block: " if you are using .values then you have to be cognizant of what you are doing". This stays the same for both of those solutions. |
I see the linked issue of multiple columns -> object array of Timestamps vs single column/Series -> coerced to datetime64. I agree that is certainly not ideal as well .. |
This is for sure worth fixing (way before p2). I'll move it to 0.21.0 though. This should coordinate with the change for |
I believe this API change would be useful for
as this is the root cause for #19420
|
@mroeschke this is not hard to fix, more about carefully changing tests. welcome a PR. |
xref #14052
discussed at bit in the original PR: #10477
I think was a mistake to return a
datetime64[ns]
in UTC for a tz-aware Series. we shouldsimply return an object array of
Timestamps
, as it round-trips correctly. IOW, you don't lose the timezones.what we should do
round trips are plainly wrong (current)
round-trips are preserved (proposed)
I don't think there is any way to transition to this and we simply have to change it. `
The text was updated successfully, but these errors were encountered: