-
Notifications
You must be signed in to change notification settings - Fork 6
Closed as not planned
Labels
api: bigqueryIssues related to the googleapis/python-db-dtypes-pandas API.Issues related to the googleapis/python-db-dtypes-pandas API.priority: p3Desirable enhancement or fix. May not be included in next release.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.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
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.
Subtasks:
- Preserve nanoseconds when we are given them in the data (e.g. from numpy array or pyarrow array).
- Add unit as an optional argument in the dtype constructor, similar to https://github.com/pandas-dev/pandas/blob/1c986d6213904fd7d9acc5622dc91d029d3f1218/pandas/core/dtypes/dtypes.py#L777 -- Note: maybe unnecessary since we always store as nanoseconds, but could be useful as a box/unbox hint (see below)
- Return / accept something other than
datetime.timethat supports nanoseconds instead of only microsecond precision. This is similar todatetime.datetimeversuspandas.Timestamp.
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the googleapis/python-db-dtypes-pandas API.Issues related to the googleapis/python-db-dtypes-pandas API.priority: p3Desirable enhancement or fix. May not be included in next release.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.‘Nice-to-have’ improvement, new feature or different behavior or design.