-
Notifications
You must be signed in to change notification settings - Fork 125
Inserting boolean NULL values in BigQuery table — needs a test added #105
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
Comments
Pandas doesn't support null values in bool columns. There's an issue to be able to supply a schema; a schema of As a hack, you could load a float column with 0, 1, and NaN, and run a query on BQ to cast as a bool |
Possibly fixed by #445 which adds support for the "new" |
Re-opening, because we need a test case here: https://github.com/googleapis/python-bigquery-pandas/blob/main/tests/system/test_to_gbq.py |
Test added: python-bigquery-pandas/tests/system/test_to_gbq.py Lines 141 to 144 in 78aa01e
as part of python-bigquery-pandas/tests/system/test_to_gbq.py Lines 141 to 144 in 78aa01e
|
For Boolean datatype, Big Query supports True,False and NULL values. However I am not able to insert NULL values using the dataFrame.to_gbq() method.
I tried with Boolean DataFrame column containing True, False, None values and with True, False, NaN values. Nothing seems to work.
Is there any method to do this or atleast a work around.
Thanks in advance!
The text was updated successfully, but these errors were encountered: