# Presenting DF

**URL:** <https://discuss.streamlit.io/t/presenting-df/9649>\
**Category:** Using Streamlit\
**Created:** [February 8, 2021, 6:54pm UTC](https://discuss.streamlit.io/t/presenting-df/9649 "2021-02-08T18:54:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rhjensen79](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/rhjensen79/32/2940_2.png) [@rhjensen79](https://discuss.streamlit.io/u/rhjensen79)\
**Post date:** [February 8, 2021, 6:54pm UTC](https://discuss.streamlit.io/t/presenting-df/9649/1 "2021-02-08T18:54:40Z")

</div>

I’m currently using st.table(data) to present my dataframe.

But i need to be able to highlight/color certain fields, if they have a positive og negative number.  
I can’t seam to get that working in st.table()

Is there a workaround, or maybe a better way of presenting the data ?

If it makes sense to see it, then the page is running here : [https://dev-autobc.cmplab.dk](https://dev-autobc.cmplab.dk)

Thanks

---

<div class="post-metadata">

**Author:** ![Marisa\_Smith](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/marisa_smith/32/11154_2.png) [@Marisa\_Smith](https://discuss.streamlit.io/u/Marisa_Smith)\
**Post date:** [February 8, 2021, 9:12pm UTC](https://discuss.streamlit.io/t/presenting-df/9649/2 "2021-02-08T21:12:06Z")

</div>

Hey @rhjensen79,

Thanks for posting a link to what you’re looking for! Actually, I believe this is the agGrid component that @PablocFonseca made!

Here is a link to all the components, the AgGrid one is there as well!

> **[Streamlit Components](https://www.streamlit.io/components)**
>
> Streamlit is an open-source app framework for Machine Learning and Data Science teams. Create beautiful data apps in hours, not weeks. All in pure Python. All for free.

Happy Streamlit-ing!  
Marisa

---

<div class="post-metadata">

**Author:** ![rhjensen79](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/rhjensen79/32/2940_2.png) [@rhjensen79](https://discuss.streamlit.io/u/rhjensen79)\
**Post date:** [February 9, 2021, 11:35am UTC](https://discuss.streamlit.io/t/presenting-df/9649/3 "2021-02-09T11:35:24Z")

</div>

I’m already using agGrid to take inputs, after recomendation from @PablocFonseca

Do any of you know, if the source if the data, can be updated, when data is modified ?  
So i only need to have one agGrid table. or do i need to have one for both input and output ?

I tried a couple of things, but could not make it update itself, even thou i read the documentations, as it should be possible ?

Thanks.

---

<div class="post-metadata">

**Author:** ![PablocFonseca](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/pablocfonseca/32/61535_2.png) [@PablocFonseca](https://discuss.streamlit.io/u/PablocFonseca)\
**Post date:** [February 9, 2021, 1:05pm UTC](https://discuss.streamlit.io/t/presenting-df/9649/4 "2021-02-09T13:05:58Z")

</div>

@rhjensen79, the grid call has an `reload_data=True|False` argument, if it is true, grid will reload the values of the input data and return it, if False component will return the data already on the grid.

Please note that setting this to always True, will cause the grid to reload the original data on every streamlit refresh, including after cells editions.

In this case, the state of you application (the edited dataframe in this case) needs to be stored somewhere else in order to “survive” streamlit refresh (a text file, for example).

I do not know your use case. But temporary text files may be a bad idea because of performance. If you look in the forums there is a discussion regarding session state, which is one way of holding the state of your application in memory between streamlit refreshs.

---

<div class="post-metadata">

**Author:** ![rhjensen79](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/rhjensen79/32/2940_2.png) [@rhjensen79](https://discuss.streamlit.io/u/rhjensen79)\
**Post date:** [February 9, 2021, 3:01pm UTC](https://discuss.streamlit.io/t/presenting-df/9649/5 "2021-02-09T15:01:15Z")

</div>

Thanks

My usecase is quite limited, and so is the data.  
So iøm guessing that i can just use the same dataframe, and just update that one, and then the grid sould reload, with the new data, if reload\_data=true

I will try.  
Thanks 🙂

---

<div class="post-metadata">

**Author:** ![Marisa\_Smith](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/marisa_smith/32/11154_2.png) [@Marisa\_Smith](https://discuss.streamlit.io/u/Marisa_Smith)\
**Post date:** [February 9, 2021, 5:35pm UTC](https://discuss.streamlit.io/t/presenting-df/9649/6 "2021-02-09T17:35:39Z")

</div>

Hey @rhjensen79,

🤦‍♀️  
TOTAlLY missed the mark on that one! Sorry! I thought you were linking an example of what you wanted to create, not what you had so far 🤣

Hopefully the `reload_data` works well for you

(Well done @PablocFonseca on **actually** posing a possible solution)

Happy Streamlit-ing!  
Marisa

---

<div class="post-metadata">

**Author:** ![rhjensen79](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/rhjensen79/32/2940_2.png) [@rhjensen79](https://discuss.streamlit.io/u/rhjensen79)\
**Post date:** [February 9, 2021, 7:32pm UTC](https://discuss.streamlit.io/t/presenting-df/9649/7 "2021-02-09T19:32:33Z")

</div>

ha ha no problem @Marisa_Smith.  
I read your reply as a solution for me to look into agGrid, so i was happy 🙂

Thanks for really great support, both of you.  
It means a lot, when you are stuck.

/Robert

---

<div class="post-metadata">

**Author:** ![randyzwitch](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/randyzwitch/32/58772_2.png) [@randyzwitch](https://discuss.streamlit.io/u/randyzwitch)\
**Post date:** [May 13, 2022, 8:43pm UTC](https://discuss.streamlit.io/t/presenting-df/9649/8 "2022-05-13T20:43:21Z")

</div>


