How to export a DataFrame to Cloud Storage?

Viewed 100

I have a DataFrame that's made from a BigQuery table. I've done some transformation on this table and now I need to export it to Cloud Storage as a .txt file with (; delimiter).

I'm using a Datalab Notebook.

How to load this transformed table as a file to a specific bucket ?

1 Answers

If you have gcsfs installed, you can simply use a google cloud storage url:

df.to_csv('gs://bucket/path/to/file.txt')
Related