-
Notifications
You must be signed in to change notification settings - Fork 125
pandas-gbq handles nulls in numeric columns differently from pandas #174
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
Note that for datetime/timestamp columns the pandas-gbq behavior is a aligned with pandas by using NaT for missing dates. |
You do then have all ints as floats. If you want floats with But I'm +0.2 to make the change - it's far more likely that someone would want a float column than an object column. |
Yeah, I find that a bit odd, but it's what the DataFrame constructor does in the case of missing values.
|
Closed by #224 |
Quick FYI, it looks like the docs still describe the old behavior: |
Pandas encodes missing / null data as NaN in numeric columns.
pandas-gbq expects the type of a column containing Nulls to be object.
https://github.com/pydata/pandas-gbq/blob/f301442082bab62c793b6a80cf00c03f97938609/tests/system.py#L295-L302
Shouldn't pandas-gbq align with the choice of pandas in this case?
The text was updated successfully, but these errors were encountered: