-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Use pandas custom data types for BigQuery DATE and TIME column…
…s, remove `date_as_object` argument (#972) * Use new pandas date and time dtypes * Get rid of date_as_object argument * added *unit* test for dealing with dates and timestamps that can't fit in datetime64[ns] * Implemented any, all, min, max and median * test (and fix) load from dataframe with date and time columns * Make sure insert_rows_from_dataframe works * Renamed date and time dtypes to bqdate and bqtime * make fallback date and time dtype names strings to make pytype happy * date and time arrays implement __arrow_array__ to facilitate arrow conversion * Make conversion of date columns from arrow pandas outout to pandas zero-copy when not date_as_object * Added date math support * Support date math with DateOffset scalars * always use types mapper for conversion from arrow to pandas * adjust unit tests to use arrow not avro * avoid "ValueError: need at least one array to concatenate" with empty RecordBatch * add missing db-dtypes requirement * avoid arrow_schema on older versions of bqstorage BREAKING CHANGE: remove `date_as_object` argument from `to_dataframe`. The `dbdate` dtype is used by default with an automatic fallback to `object` when dates are not within the range of a nanosecond-precision pandas timestamp Co-authored-by: Anthonios Partheniou <[email protected]> Co-authored-by: Tim Swast <[email protected]> Co-authored-by: Leah E. Cole <[email protected]>
- Loading branch information
1 parent
42d3db6
commit 3d1af95
Showing
16 changed files
with
396 additions
and
176 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
db-dtypes==0.3.0 | ||
google-cloud-bigquery-storage==2.9.0 | ||
google-auth-oauthlib==0.4.6 | ||
grpcio==1.41.0 | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
db-dtypes==0.3.0 | ||
google-cloud-bigquery-storage==2.9.0 | ||
google-auth-oauthlib==0.4.6 | ||
grpcio==1.41.0 | ||
|
This file contains 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
Oops, something went wrong.