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
fix: omit NaN
values when uploading from insert_rows_from_dataframe
#170
fix: omit NaN
values when uploading from insert_rows_from_dataframe
#170
Conversation
NaN values are most often used to indicate a NULL value in pandas. Also, even when a column is a floating point column, the BigQuery streaming API JSON parser doesn't seem to be able to handle NaN literals.
Tests pass locally except for two failures
The two test failures seem to be for permissions issues (which is strange because I think my service account is EDITOR on the project)
Python 2.7:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix works and the changes look good.
for call, expected_data in six.moves.zip_longest( | ||
actual_calls, EXPECTED_SENT_DATA | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice pattern!
NaN values are most often used to indicate a NULL value in pandas. Also,
even when a column is a floating point column, the BigQuery streaming
API JSON parser doesn't seem to be able to handle NaN literals.
Fixes #169🦕