I studied how to export BigQuery data in Pandas. There are two methods:
Export the file to CVS and upload it - https://cloud.google.com/bigquery/exporting-data-from-bigquery
Pull data directly into the pandas frame. It doesn't seem to work, but the method is pandas.io.gbq.read_gbq (query, project_id = no, index_col = no, col_order = no, reauth = False). Looks like gbq has been discontinued?
Can someone suggest the best and most efficient way to do this?
Thank.
gbq.read_gbq pandas.15.0-1, .14.0-1, (Windows 7). Python, dataframe Google BigQuery, , .
gbq.read_gbq
, , , , Google, . (oauth2client.tools.run), .
, : http://pandas-docs.imtqy.com/pandas-docs-travis/io.html#io-bigquery
FYI, dev, Gcloud, .
Python, google-pandas-load . https://google-pandas-load.readthedocs.io/en/latest/.
:
from google_pandas_load import LoaderQuickSetup gpl = LoaderQuickSetup( project_id='pi', dataset_id='di', bucket_name='bn', local_dir_path='/tmp')
df = gpl.load(source='query', destination='pandas', query=query)
, google.cloud.bigquery.job.QueryJob.to_dataframe(). .