You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
load_table_from_dataframe -- support alternative serialization formats #383
Currently, pandas-gbq doesn't use load_table_from_dataframe because it is using CSV for serialization, which has better support for TIME, DATE, DATETIME than Parquet. See: #56, #382
Struct / Array support could also be improved (though this is partially due to problems in the pyarrow library). #19
To go from DataFrame to CSV, we can use the same tempfile logic as we have for parquet, but instead use to_csv + a few parameters to ensure proper data types:
@tswast I have the initial work for this in #399. Looking for comments about which are the best parameters to use in the to_csv call, and whether this is going in the right direction.
Activity
tswast commentedon Nov 17, 2020
To go from DataFrame to CSV, we can use the same tempfile logic as we have for parquet, but instead use
to_csv+ a few parameters to ensure proper data types:https://github.com/pydata/pandas-gbq/blob/ac2d2fe4ac0025109f8df3723e3f03a337face94/pandas_gbq/load.py#L16-L30
tswast commentedon Nov 17, 2020
This would also require adding CSV to the allowed serialization formats here:
python-bigquery/google/cloud/bigquery/client.py
Lines 2201 to 2206 in 809e4a2
cguardia commentedon Nov 24, 2020
@tswast I have the initial work for this in #399. Looking for comments about which are the best parameters to use in the
to_csvcall, and whether this is going in the right direction.