bshyamm
bshyamm

Reputation: 31

Google Colaboratory Export Data Frame

Im using google colaboratory to run some models. I was able to upload a csv file with features in google drive, import it in and run models on that data. I want to export the final dataframe out to csv. Cant find a way to do that, please advise.

df.to_csv('df.csv', index=False)

This runs without an error, but I cant find where the file is saved.

Or let me know if there is a better way to export my df out.

Upvotes: 3

Views: 4575

Answers (2)

kihtov23
kihtov23

Reputation: 131

You can find answer here: Exporting Data from google colab to local machine

So what you need to do is: - open the left pane - select 'Files' tab - click 'Refresh' - right click the file, then download

Upvotes: 2

korakot
korakot

Reputation: 40838

You can download the data back to your local machine with

from google.colab import files
files.download('df.csv')

Upvotes: 6

Related Questions