How to export data frames which are created in google colab to your local machine?
I have cleaned a data set on google colab. Now I want to export the data frame to my local machine. df.to_csv
is saving file to the virtual machine and not my local machine.
Downloading files from Colab to local file system using Python code: The download method of the files object can be used to download any file from colab to your local drive. The download progress is displayed, and once the download completes, you can choose where to save it in your local machine.
Try this
from google.colab import files files.download("data.csv")
Update(Sep 2018): now it's even easier
Update (Jan 2020): the UI changes
folder icon
on the left pane (3rd icon)Try this:
First you can save the file using pandas to_csv
functionality later on you can download that file using google colab files functionality.
from google.colab import files df.to_csv('filename.csv') files.download('filename.csv')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With