ARROW-2122: [Python] Pyarrow fails to serialize dataframe with timestamp. - #1707
Closed
adshieh wants to merge 3 commits into
Closed
ARROW-2122: [Python] Pyarrow fails to serialize dataframe with timestamp.#1707adshieh wants to merge 3 commits into
adshieh wants to merge 3 commits into
Conversation
adshieh
commented
Mar 6, 2018
| return 'ns' | ||
|
|
||
|
|
||
| FIXED_OFFSET_PREFIX = '+' |
Member
There was a problem hiding this comment.
We probably want the offset to be encoded as [+-]HH:MM.
See https://github.com/apache/arrow/blob/master/format/Schema.fbs#L162-L166
Member
pitrou
reviewed
Mar 13, 2018
| FIXED_OFFSET_PREFIX = '+' | ||
|
|
||
|
|
||
| def tzinfo_to_string(tz): |
Member
There was a problem hiding this comment.
These two functions would deserve a docstring, and appropriate unit tests.
pitrou
reviewed
Mar 13, 2018
| assert pa.Array.from_pandas(expected).equals(result) | ||
|
|
||
|
|
||
| def test_fixed_offset_timezone(): |
Member
There was a problem hiding this comment.
Please put this under the class above.
pitrou
approved these changes
Apr 2, 2018
pitrou
left a comment
Member
There was a problem hiding this comment.
This looks good to me. Perhaps a pandas or timezone expert wants to comment, otherwise I think it's good to go.
| return 'ns' | ||
|
|
||
|
|
||
| _FIXED_OFFSET_RE = re.compile(r'([+-])(0[0-9]|1[0-9]|2[0-3]):([0-5][0-9])') |
Member
There was a problem hiding this comment.
I think this needs a $ at the end to avoid ignoring any trailing text.
xhochy
approved these changes
Apr 3, 2018
xhochy
left a comment
Member
There was a problem hiding this comment.
+1, LGTM
CI failures are unrelated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes ARROW-2122.