Repository navigation
Conversation
There was a problem hiding this comment.
To my knowledge, all pandas data having a time zone is UTC -- if data is time zone naive, then we may assume UTC in Arrow. I don't think any conversions are necessary here
There was a problem hiding this comment.
It would be better to put this in a Notes section, or in the Sphinx documentation
There was a problem hiding this comment.
From my comment above, you can look at x.values.view(np.int64) before and after tz_convert('US/Eastern') to check that the internal values are not modified. If you localize with a non-UTC timestamp, that actually changes the values
There was a problem hiding this comment.
Can you combine the null and non-null test case?
There was a problem hiding this comment.
I still don't believe this is necessary.
In [11]: dr = pd.date_range('2000-01-01', periods=10)
In [12]: dr_utc = dr.tz_localize('UTC')
In [13]: dr_utc.values.view(np.int64)
Out[13]:
array([946684800000000000, 946771200000000000, 946857600000000000,
946944000000000000, 947030400000000000, 947116800000000000,
947203200000000000, 947289600000000000, 947376000000000000,
947462400000000000])
In [14]: dr_utc.tz_convert('US/Eastern').values.view(np.int64)
Out[14]:
array([946684800000000000, 946771200000000000, 946857600000000000,
946944000000000000, 947030400000000000, 947116800000000000,
947203200000000000, 947289600000000000, 947376000000000000,
947462400000000000])There was a problem hiding this comment.
Oops.. now I see what you mean! let me go back and fix, and re-rebase.
There was a problem hiding this comment.
Can you revert the code changes in this function?
There was a problem hiding this comment.
Can you revise to say "Localized timestamps will currently be returned as UTC (pandas's native representation). Timezone-naive data will be implicitly interpreted as UTC".
|
@ahnj can you rebase on the the lastest master? this is based on a commit from 10 days ago https://github.com/ahnj/arrow/commits/timestamp-aware |
…columns new test and docs to enforce and document internal UTC storage of timestamps and related operations explicit.
|
@wesm - rebased with the latest master. |
arrow is now pandas datetime timezone aware