# How can I download the table (the CSV file) that I logged in a run it programmatically on my compute

**URL:** <https://community.wandb.ai/t/how-can-i-download-the-table-the-csv-file-that-i-logged-in-a-run-it-programmatically-on-my-compute/4718>\
**Category:** W&B Help\
**Created:** [July 11, 2023, 8:53am UTC](https://community.wandb.ai/t/how-can-i-download-the-table-the-csv-file-that-i-logged-in-a-run-it-programmatically-on-my-compute/4718 "2023-07-11T08:53:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ortal](https://avatars.discourse-cdn.com/v4/letter/o/8491ac/32.png) [@ortal](https://community.wandb.ai/u/ortal)\
**Post date:** [July 11, 2023, 8:53am UTC](https://community.wandb.ai/t/how-can-i-download-the-table-the-csv-file-that-i-logged-in-a-run-it-programmatically-on-my-compute/4718/1 "2023-07-11T08:53:20Z")

</div>

How can I download the table (the CSV file) that I logged in a run it programmatically on my computer using python?

---

<div class="post-metadata">

**Author:** ![luis\_bergua](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@luis\_bergua](https://community.wandb.ai/u/luis_bergua)\
**Post date:** [July 11, 2023, 11:02am UTC](https://community.wandb.ai/t/how-can-i-download-the-table-the-csv-file-that-i-logged-in-a-run-it-programmatically-on-my-compute/4718/2 "2023-07-11T11:02:02Z")

</div>

Hi @ortal, thanks for writing in! There are several ways to download the table by accessing the artifact containing it and [downloading it](https://docs.wandb.ai/guides/artifacts/download-and-use-an-artifact#download-and-use-an-artifact-stored-on-wb) or [downloading the specific file](https://docs.wandb.ai/ref/python/artifact#file). Tables are logged as json files but you can then convert to csv with a code like:

```auto
import json
import csv

def convert_json_to_csv(json_file_path, csv_file_path):
    with open(json_file_path, 'r') as json_file:
        data = json.load(json_file)

    columns = data['columns']
    data_rows = data['data']

    with open(csv_file_path, 'w', newline='') as csv_file:
        writer = csv.writer(csv_file)
        writer.writerow(columns)
        writer.writerows(data_rows)

```

---

<div class="post-metadata">

**Author:** ![luis\_bergua](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@luis\_bergua](https://community.wandb.ai/u/luis_bergua)\
**Post date:** [July 12, 2023, 4:14pm UTC](https://community.wandb.ai/t/how-can-i-download-the-table-the-csv-file-that-i-logged-in-a-run-it-programmatically-on-my-compute/4718/3 "2023-07-12T16:14:50Z")

</div>

Hi @ortal, following up here! Did you have the chance to test my suggestion above and did it work for you? Please let me know if you’d need further assistance here!

---

<div class="post-metadata">

**Author:** ![luis\_bergua](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@luis\_bergua](https://community.wandb.ai/u/luis_bergua)\
**Post date:** [July 14, 2023, 11:51am UTC](https://community.wandb.ai/t/how-can-i-download-the-table-the-csv-file-that-i-logged-in-a-run-it-programmatically-on-my-compute/4718/4 "2023-07-14T11:51:33Z")

</div>

Hi Ortal, since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/1X/366b649231631dbab896843020da0056074ac79d.png) [@system](https://community.wandb.ai/u/system)\
**Post date:** [September 10, 2023, 4:14pm UTC](https://community.wandb.ai/t/how-can-i-download-the-table-the-csv-file-that-i-logged-in-a-run-it-programmatically-on-my-compute/4718/5 "2023-09-10T16:14:56Z")

</div>

Closed on September 10, 2023, 4:14pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
