简体   繁体   中英

Export a python dataframe from Google AI Platform Notebook to a table in Google BigQuery

I got a dataframe in Google AI Platform Notebook (PN) that i would like to transfer to a table in Google BigQuery.

I am aware of the option to use: df.to_gqb() but that requires a pip install of pandas_gbq. I prefer to avoid pip installs on top of the libraries already included in PN to keep the setup as simple as possible.

Do i perhaps miss an easy solution?

Br, Torben

There is a native library for importing data into BigQuery, via the BigQuery Client Library.

As the "google.cloud" library is already part of AI Platform notebooks environment, you won't need to install any new packages (thanks Torben for the confirmation!)

Here is a link to the official documentation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM