# 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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bcds.gitbook.io/learn/tutorials/data-visualization/google-colab/results-export.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
