# The output of dataframe

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-output-of-dataframe%2F50380%3E%5C
**Category:** 🔒 Gradio\
**Created:** [August 11, 2023, 7:09am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-output-of-dataframe%2F50380 "2023-08-11T07:09:29Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kingzc1](https://avatars.discourse-cdn.com/v4/letter/k/fbc32d/32.png) [@Kingzc1](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FKingzc1)%5C
**Post date:** [August 11, 2023, 7:09am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-output-of-dataframe%2F50380%2F1 "2023-08-11T07:09:29Z")

</div>

I have set output as dataframe but it does not look good. I prefer the output component to be fixed.  
Anyone could give me some advice, thanks

---

<div class="post-metadata">

**Author:** ![abidlabs](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/abidlabs/32/21878_2.png) [@abidlabs](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fabidlabs)%5C
**Post date:** [August 15, 2023, 3:24pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-output-of-dataframe%2F50380%2F2 "2023-08-15T15:24:36Z")

</div>

You can set `interactive=False` to make the dataframe static.

---

<div class="post-metadata">

**Author:** ![Kingzc1](https://avatars.discourse-cdn.com/v4/letter/k/fbc32d/32.png) [@Kingzc1](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FKingzc1)%5C
**Post date:** [August 17, 2023, 1:31am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-output-of-dataframe%2F50380%2F3 "2023-08-17T01:31:22Z")

</div>

thanks for your reply!

the input is an excel file and the output is a dataframe.  
the method is pd.read\_excel().  
the purpose is the dataframe could be in a container that has a fixed width and height and users could use scroll to borrowers the whole dataframe, and I would like to set input and output as equal height which could make UI look better.  
the problem is that equal\_height method does not work, I think the reason is the output dataframe is dynamic.

thanks!

---

<div class="post-metadata">

**Author:** ![abidlabs](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/abidlabs/32/21878_2.png) [@abidlabs](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fabidlabs)%5C
**Post date:** [August 21, 2023, 1:27pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-output-of-dataframe%2F50380%2F4 "2023-08-21T13:27:59Z")

</div>

We don’t currently support pagination / fixed rows in a gr.Dataframe but we are looking into it!

---

<div class="post-metadata">

**Author:** ![Kingzc1](https://avatars.discourse-cdn.com/v4/letter/k/fbc32d/32.png) [@Kingzc1](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FKingzc1)%5C
**Post date:** [August 22, 2023, 2:40am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-output-of-dataframe%2F50380%2F5 "2023-08-22T02:40:57Z")

</div>

thanks for reply!

Hope you can achieve it!

---

<div class="post-metadata">

**Author:** ![abidlabs](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/abidlabs/32/21878_2.png) [@abidlabs](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fabidlabs)%5C
**Post date:** [August 22, 2023, 2:31pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-output-of-dataframe%2F50380%2F6 "2023-08-22T14:31:34Z")

</div>

I’ve opened a pull request here: [Add height parameter and scrolling to `gr.Dataframe` by abidlabs · Pull Request #5283 · gradio-app/gradio · GitHub](https://github.com/gradio-app/gradio/pull/5283)

---

<div class="post-metadata">

**Author:** ![dpraz](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@dpraz](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdpraz)%5C
**Post date:** [September 16, 2023, 3:16pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-output-of-dataframe%2F50380%2F7 "2023-09-16T15:16:00Z")

</div>

Hi @abidlabs! I’m interested if any changes have been made recently in this regard. I have a working UI that, up until several days ago, had a Datframe which automatically set it’s height to fit the number of rows. This was my preferred setup. Without making any changes to the code, the dataframe has reverted to be a fixed height (only ~12 rows) and now a scrollbar appears. I would really like to change the dataframe back to fit the number of rows, without a scroll bar. Any thoughts on this? I initialize the dataframe like so:

```
plotting_df=gr.Dataframe(value=df2,headers="class","type","group","ε54Cr","ε50Ti","ε94Mo"],
 label="CosmoPlot Compilation:",type="pandas", visible=True, interactive=False)

```

Thanks!

---

<div class="post-metadata">

**Author:** ![abidlabs](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/abidlabs/32/21878_2.png) [@abidlabs](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fabidlabs)%5C
**Post date:** [September 18, 2023, 6:49pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-output-of-dataframe%2F50380%2F8 "2023-09-18T18:49:58Z")

</div>

> [@dpraz](#):
>
> ```auto
> plotting_df=gr.Dataframe(value=df2,headers="class","type","group","ε54Cr","ε50Ti","ε94Mo"],
> label="CosmoPlot Compilation:",type="pandas", visible=True, interactive=False)
> 
> ```

Hi @dpraz, yes so you can set a `height` for the `gr.Dataframe`, which is kind of a max height – if you set this to a very large value, then the dataframe’s height will just be the height of the contents. Now that’s how it _should_ behave. However, we currently have a bug that is preventing this from happening – we are looking into it! [Issues · gradio-app/gradio · GitHub](https://github.com/gradio-app/gradio/issues?q=is%3Aissue+is%3Aopen+dataframe)

---

<div class="post-metadata">

**Author:** ![dpraz](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@dpraz](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdpraz)%5C
**Post date:** [September 18, 2023, 8:05pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-output-of-dataframe%2F50380%2F9 "2023-09-18T20:05:04Z")

</div>

Thanks @abidlabs! Yes, I was experiencing this bug and wasn’t sure if it was an issue with the way I was coding or actually an issue with the update. Glad to see we have people on the case. Thanks again for the update.
