We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In [1]: Series([Timestamp('20130101'), Timestamp('20130101', tz='US/Eastern')]) Out[1]: 0 2012-12-31 19:00:00-05:00 1 2013-01-01 00:00:00-05:00 dtype: datetime64[ns, US/Eastern]
should instead be
In [2]: Series([Timestamp('20130101'), Timestamp('20130101', tz='US/Eastern')], dtype=object) Out[2]: 0 2013-01-01 00:00:00 1 2013-01-01 00:00:00-05:00 dtype: object
The text was updated successfully, but these errors were encountered:
Would making tz default to 'UTC' upon Timestamp() declaration be sufficient to fix this bug?
In [10]: pd.Series([pd.Timestamp('20130101'), pd.Timestamp('20130101', tz='US/Eastern')], dtype=object) Out[10]: 0 2013-01-01 00:00:00 1 2013-01-01 00:00:00-05:00 dtype: object In [11]: pd.Series([pd.Timestamp('20130101', tz='UTC'), pd.Timestamp('20130101', tz='US/Eastern')]) Out[11]: 0 2013-01-01 00:00:00+00:00 1 2013-01-01 00:00:00-05:00 dtype: object
Sorry, something went wrong.
@theairportexplorer no!
naive and tz-aware UTC are different! The default is naive (has always been and always will).
The rough code path for this call Series([Timestamp('20130101'), Timestamp('20130101', tz='US/Eastern')]) is: series.py.Series.__init__ (263): _sanitize_array() series.py.Series._sanitize_array (3179): maybe_cast_to_datetime() cast.py.maybe_cast_to_datetime (1044): maybe_infer_to_datetimelike() cast.py.maybe_infer_to_datetimelike (914): try_datetime cast.py.try_datetime (882): tslib.array_to_datetime() tslib.pyx array_to_datetime(): raise ValueError because it's trying convert Timestamp('20130101', tz='US/Eastern') to datetime64 with utc=None? cast.py.try_datetime(890): tools/datetimes.py.to_datetime() tools/datetimes.py.to_datetime (466): _convert_listlike tools/datetimes.py._convert_listlike (361): tslib.array_to_datetime -> ValueError tools/datetimes.py._conver_listlike (376): tslib.datetime_to_datetime64(arg) -> array(['2013-01-01T00:00:00.000000000', '2013-01-01T05:00:00:000000000'],dtype=datetime64[ns])
Series([Timestamp('20130101'), Timestamp('20130101', tz='US/Eastern')])
Successfully merging a pull request may close this issue.
should instead be
The text was updated successfully, but these errors were encountered: