# St.dataframe shows empty rows

**URL:** <https://discuss.streamlit.io/t/st-dataframe-shows-empty-rows/36322>\
**Category:** Using Streamlit\
**Tags:** pandas\
**Created:** [January 19, 2023, 8:34am UTC](https://discuss.streamlit.io/t/st-dataframe-shows-empty-rows/36322 "2023-01-19T08:34:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sathish\_Prasad](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/sathish_prasad/32/21887_2.png) [@Sathish\_Prasad](https://discuss.streamlit.io/u/Sathish_Prasad)\
**Post date:** [January 19, 2023, 8:34am UTC](https://discuss.streamlit.io/t/st-dataframe-shows-empty-rows/36322/1 "2023-01-19T08:34:14Z")

</div>

I’m trying to filter out the top 10 rows from a dataframe and print is using st.dataframe I end up getting the desired top 10 rows but it’s also accompanied by empty rows from the actual dataframe.

Code Snippet

st.dataframe(final\_table.head(x),width=4000,height=8000)

 ![Capture](https://global.discourse-cdn.com/streamlit/original/3X/2/c/2c04e2011b88d2ba2fe2f403667f0fd183e707b6.png)

---

<div class="post-metadata">

**Author:** ![Goyo](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/goyo/32/28219_2.png) [@Goyo](https://discuss.streamlit.io/u/Goyo)\
**Post date:** [January 19, 2023, 9:15am UTC](https://discuss.streamlit.io/t/st-dataframe-shows-empty-rows/36322/2 "2023-01-19T09:15:36Z")

</div>

That doesn’t come “from the actual dataframe”, it is just the way `st.dataframe()` fills the empty space.

---

<div class="post-metadata">

**Author:** ![Sathish\_Prasad](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/sathish_prasad/32/21887_2.png) [@Sathish\_Prasad](https://discuss.streamlit.io/u/Sathish_Prasad)\
**Post date:** [January 19, 2023, 9:36am UTC](https://discuss.streamlit.io/t/st-dataframe-shows-empty-rows/36322/3 "2023-01-19T09:36:36Z")

</div>

Yeah, I realised. Works fine with st.table, but I do like the interactive ability of st.dataframe. Anything you suggest?

---

<div class="post-metadata">

**Author:** ![Goyo](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/goyo/32/28219_2.png) [@Goyo](https://discuss.streamlit.io/u/Goyo)\
**Post date:** [January 19, 2023, 11:34am UTC](https://discuss.streamlit.io/t/st-dataframe-shows-empty-rows/36322/4 "2023-01-19T11:34:07Z")

</div>

I don’t know why you see that as a problem or why you are using the `height` argument so I can’t advise you.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/streamlit/original/3X/c/f/cf4c2ee0d938358f82448c5fe4b9c3c91d7ce19c.svg) [@system](https://discuss.streamlit.io/u/system)\
**Post date:** [January 19, 2024, 11:34am UTC](https://discuss.streamlit.io/t/st-dataframe-shows-empty-rows/36322/5 "2024-01-19T11:34:24Z")

</div>

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