-
-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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/DOC: to_series keep_tz behaviour for UTC timezone #9562
Comments
@jreback you put this in I think. Should be change the docs, or change the implementation? I would find it more logical to not make this exception for UTC (so keep the behaviour and change the docs) |
Ah, but, this behaviour seems to have changed from 0.14 to 0.15. Originally in 0.14, the behaviour was as described in the docs |
this was a bug in that we do want to actually preserve the UTC tz on the resulting Series (IOW it becomes |
closed by 8ef921f |
FYI, I think that we could basically drop this paramater (which is an API change because the default would change), and automatically preserve the character of the index when converting to a series, once DatetimeTZBlock blocks become a reality. (I added this originally because the perf impact is pretty big once you convert to object dtypes) |
Yes, once a timezone aware DatetimeBlock is in place, we can certainly consider that. |
The docstring of
to_series
says forkeep_tz=True
: "If the timezone is not set or is UTC, the resulting Series will have a datetime64[ns] dtype. Otherwise the Series will have an object dtype."http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DatetimeIndex.to_series.html
But is seems that also for UTC,
keep_tz=True
does the conversion to object/Timestamp?The text was updated successfully, but these errors were encountered: