Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: converting to dataframe with out of bounds timestamps#209

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gcf-merge-on-green merged 2 commits intogoogleapis:masterfromplamut:iss-168
Aug 15, 2020

Conversation

@plamut
Copy link
Contributor

@plamutplamut commentedAug 1, 2020
edited
Loading

Fixes#168.

This PR fixes the problem when converting query results to Pandas withpyarrow when data contains timestamps that would fall out ofpyarrow's nanoseconds precision.

The fix requirespyarrow>=1.0.0, thus it only works on Python 3.

PR checklist

  • Make sure to open an issue as abug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

@plamutplamut requested a review fromtswastAugust 1, 2020 16:10
@google-clagoogle-clabot added the cla: yesThis human has signed the Contributor License Agreement. labelAug 1, 2020
@plamut
Copy link
ContributorAuthor

@tswast There is inconsistency with the existingdate_as_object option thatis exposed to the users, while thetimestamp_as_object option is hidden. Let me know if you want to unify these two approaches to a similar problem.

Copy link
Contributor

@tswasttswast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks!

Regardingdate_as_object, it's a little different in that case, because it doesn't throw an error for dates. They just come back as strings if it's not set.

If we do providetimestamp_as_object, I think it needs to be 3 states:

  • (default) the behavior in this fix
  • (explicitly false) let the error happen, since they want to use native pandas Timestamp (maybe for performance reasons)
  • (explicitly true) always convert to datetime objects

@plamutplamut marked this pull request as ready for reviewAugust 6, 2020 12:29
@plamut
Copy link
ContributorAuthor

Let me know if I should also add an explicittimestamp_as_object parameter as envisioned by@tswast, or should we leave it out from this fix and (maybe) add it in a separate feature PR.

Copy link
Contributor

@tswasttswast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks!

I think we can wait for a separate PR for thetimestamp_as_object parameter feature.

@plamutplamut added the automergeMerge the pull request once unit tests and other checks pass. labelAug 15, 2020
@gcf-merge-on-greengcf-merge-on-greenbot merged commit8209203 intogoogleapis:masterAug 15, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tswasttswasttswast approved these changes

@shollymanshollymanAwaiting requested review from shollyman

Assignees

No one assigned

Labels

automergeMerge the pull request once unit tests and other checks pass.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

to_dataframe fails when fetching timestamp values outside nanosecond bounds

2 participants

@plamut@tswast

[8]ページ先頭

©2009-2025 Movatter.jp