# Dataframe output table download as csv

**URL:** <https://discuss.huggingface.co/t/dataframe-output-table-download-as-csv/29880>\
**Category:** 🔒 Gradio\
**Created:** [January 17, 2023, 12:22pm UTC](https://discuss.huggingface.co/t/dataframe-output-table-download-as-csv/29880 "2023-01-17T12:22:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dimadgo](https://avatars.discourse-cdn.com/v4/letter/d/b5e925/32.png) [@dimadgo](https://discuss.huggingface.co/u/dimadgo)\
**Post date:** [January 17, 2023, 12:22pm UTC](https://discuss.huggingface.co/t/dataframe-output-table-download-as-csv/29880/1 "2023-01-17T12:22:17Z")

</div>

Hi, having predictions as a Dataframe table is there a way to gave a user an option to download the table as CSV? I need that “download CSV” button. Thank you!

---

<div class="post-metadata">

**Author:** ![freddyaboulton](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/freddyaboulton/32/32732_2.png) [@freddyaboulton](https://discuss.huggingface.co/u/freddyaboulton)\
**Post date:** [January 17, 2023, 12:34pm UTC](https://discuss.huggingface.co/t/dataframe-output-table-download-as-csv/29880/2 "2023-01-17T12:34:58Z")

</div>

Hi @dimadgo !

I don’t think you can download directly from the dataframe output but you can save the dataframe as a csv from within your function and then store it in a separate gr.File output.

---

<div class="post-metadata">

**Author:** ![dimadgo](https://avatars.discourse-cdn.com/v4/letter/d/b5e925/32.png) [@dimadgo](https://discuss.huggingface.co/u/dimadgo)\
**Post date:** [January 17, 2023, 5:24pm UTC](https://discuss.huggingface.co/t/dataframe-output-table-download-as-csv/29880/3 "2023-01-17T17:24:45Z")

</div>

Hi [freddyaboulton](https://discuss.huggingface.co/u/freddyaboulton), it looks like a solution in most cases, but if I set output dataframe object as interactive for user to be able to change content of the output table (like adding notes to it) this will not work I suppose, any ideas?

---

<div class="post-metadata">

**Author:** ![abidlabs](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/abidlabs/32/21878_2.png) [@abidlabs](https://discuss.huggingface.co/u/abidlabs)\
**Post date:** [January 21, 2023, 2:35am UTC](https://discuss.huggingface.co/t/dataframe-output-table-download-as-csv/29880/4 "2023-01-21T02:35:41Z")

</div>

Check out the example here, it shows how to do exactly this: [interactive = True does not work in output gr.Dataframe() · Issue #2975 · gradio-app/gradio · GitHub](https://github.com/gradio-app/gradio/issues/2975#issuecomment-1385602531)

---

<div class="post-metadata">

**Author:** ![soerendip](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/soerendip/32/14075_2.png) [@soerendip](https://discuss.huggingface.co/u/soerendip)\
**Post date:** [May 3, 2023, 8:47pm UTC](https://discuss.huggingface.co/t/dataframe-output-table-download-as-csv/29880/5 "2023-05-03T20:47:58Z")

</div>

Some example code would be nice.

---

<div class="post-metadata">

**Author:** ![akhilpeterrajan](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/akhilpeterrajan/32/21608_2.png) [@akhilpeterrajan](https://discuss.huggingface.co/u/akhilpeterrajan)\
**Post date:** [November 28, 2023, 3:40am UTC](https://discuss.huggingface.co/t/dataframe-output-table-download-as-csv/29880/6 "2023-11-28T03:40:21Z")

</div>

Hello,

Any update on this feature of downloading the CSV from the dataframe output ?
