-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
BUG: ArrowDtype.construct_from_string round-trip #50689
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
Might make sense to feature request this to Arrow to support parsing tz's in |
I'll do that separately, sure. |
issue has been opened upstream + green |
@mroeschke gentle ping on pyarrow-xfail PRs |
pandas/core/arrays/arrow/dtype.py
Outdated
tail = tail[:-1] | ||
|
||
if head == "timestamp": | ||
if "," not in tail: |
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.
I don't think case needs handling
In [2]: pa.type_for_alias("timestamp[ns]")
Out[2]: TimestampType(timestamp[ns])
ArrowDtype.construct_from_string("timestamp[s, tz=UTC][pyarrow]") | ||
ArrowDtype.construct_from_string("not_a_real_dype[s, tz=UTC][pyarrow]") | ||
|
||
# but as of GH#50689, timestamptz is supported |
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.
In a follow up could you make this it's own test? (Nit: doesn't really fit the name of the test"
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.
fair enough, will do
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.
LGTM pending greenish
CI timeouts unrelated, merging. |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.