# How to use gradio dataframe as output for an interface

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-gradio-dataframe-as-output-for-an-interface%2F19798%3E%5C
**Category:** 🔒 Gradio\
**Created:** [June 29, 2022, 4:11pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-gradio-dataframe-as-output-for-an-interface%2F19798 "2022-06-29T16:11:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vftnr](https://avatars.discourse-cdn.com/v4/letter/v/d6d6ee/32.png) [@vftnr](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fvftnr)%5C
**Post date:** [June 29, 2022, 4:11pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-gradio-dataframe-as-output-for-an-interface%2F19798%2F1 "2022-06-29T16:11:31Z")

</div>

So I have a scraper that collects data from different sources and them returns the result as a dataframe. I currently want to create a Gradio interface that given a user input would returns the resulting dataframe as output.

`gr.Interface(fn=scraper_obj.scrape, inputs='text', outputs=gr.Dataframe(headers=['title', 'author', 'text']), allow_flagging='never').launch()`

As you can see in the above code, the interface would call the scrape function on the user input which would return a dataframe that has three columns (title, author and text) but when I try this code, it returns this [output](https://imgur.com/uz8XNQy).

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [June 29, 2022, 5:40pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-gradio-dataframe-as-output-for-an-interface%2F19798%2F2 "2022-06-29T17:40:52Z")

</div>

hi @vftnr , you probably need to tidy up your data before outputting it to the dataframe component. It can accept different [types of objects](https://gradio.app/docs/#:~:text=bool%22%2C%20and%20%22date%22.-,type,str,-Type%20of%20value). If you can give us a more complete code snippet, perhaps I can help you debug ?
