-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: Implement interchange protocol for DatetimeTZDtype #54246
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one, looks good to me
There should probably be a test for interchanging from non-pandas tz-aware, such as
pyarrow.Table
ts: timestamp[us, tz=Asia/Kathmandu]
----
ts: [[2019-12-31 18:15:00.000000,null,2020-01-01 18:15:00.000000]]
?
Anyway, not a blocker, I can do that separately
@@ -269,7 +274,11 @@ def _get_data_buffer( | |||
DtypeKind.BOOL, | |||
DtypeKind.DATETIME, | |||
): | |||
buffer = PandasBuffer(self._col.to_numpy(), allow_copy=self._allow_copy) | |||
if self.dtype[0] == DtypeKind.DATETIME and len(self.dtype[2]) > 4: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so anything longer than 'tsn:'
will go here (like tss:US/Pacific
), nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah correct. Added a comment to that effect
Yes definitely. Would be good to have that as a follow up |
cool, I'll do that tomorrow |
…4246) * ENH: Implement interchange protocol for DatetimeTZDtype * Add type ignores * Add comment
…4246) (#36) * ENH: Implement interchange protocol for DatetimeTZDtype * Add type ignores * Add comment Co-authored-by: Matthew Roeschke <[email protected]>
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.