> For the complete documentation index, see [llms.txt](https://bcds.gitbook.io/learn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bcds.gitbook.io/learn/tutorials/data-visualization/google-colab/results-export.md).

# Results Export

#### Export data to csv file to local directory

```python
from google.colab import files
df.to_csv('FILENAME.csv') 
files.download('FILENAME.csv')  #Download winder pops out
```

#### Export data to CSV file to Google Drive

```python
from google.colab import drive
drive.mount('/content/drive')  #Copy and paste Google Authentication code
df.to_csv('/content/drive/PATH TO Google Drive FOLDER')
```

#### Export plot image to local directory

```python
#Export bar chart
bar_image = bar_2.get_figure().savefig('bar_image.png')
from google.colab import files
files.download('bar_image.png')  #Download window pops out

#Export line chart
line_image = line_1.get_figure().savefig('line_image.png')
from google.colab import files
files.download('line_image.png')  #Download window pops out

#Export scatter plot chart
scat_image = scatter.get_figure().savefig('scatter_image.png')
from google.colab import files
files.download('scatter_image.png')  #Download window pops out
```
