Skip to content
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

support nanosecond precision values #19

Open
tswast opened this issue Sep 30, 2021 · 3 comments
Open

support nanosecond precision values #19

tswast opened this issue Sep 30, 2021 · 3 comments
Labels
api: bigquery Issues related to the googleapis/python-db-dtypes-pandas API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@tswast
Copy link
Collaborator

tswast commented Sep 30, 2021

datetime.time only supports microsecond precision.

Similarly, the BigQuery TIME data type only returns microsecond precision.

The pandas convention is to use nanosecond precision for timestamps via the pandas.Timestamp class. It may make sense for this extension dtype to also support this.

@tswast tswast added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p3 Desirable enhancement or fix. May not be included in next release. labels Sep 30, 2021
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-db-dtypes-pandas API. label Sep 30, 2021
@jbrockmendel
Copy link

Could wrap TimedeltaArray and disallow anything not between 0 and 24H

@tswast
Copy link
Collaborator Author

tswast commented Nov 4, 2021

#39 makes some tiny progress towards this. If going from arrow -> pandas -> arrow, nanosecond-precision times should be preserved.

@tswast
Copy link
Collaborator Author

tswast commented Dec 3, 2021

Could wrap TimedeltaArray and disallow anything not between 0 and 24H

That's more-or-less what we're doing already. We store the right precision data, but when folks access individual rows, they get back a datetime.time which doesn't have a nanosecond field. Need something similar to pandas.Timestamp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-db-dtypes-pandas API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants