I figured out that I can color the background cells of my streamlit table using pandas.style.
However, I want to use streamlit-aggrid and I canāt change the background colors using the pandas styler.
I managed to color the cells using Javascript but I find it uncomfortable to use.
Can you help me with that?
Thanks!
Hey @Omri_Ben-Shahar,
It looks like you can configure the cell color for a column via the following:
gb.configure_column("group", cellStyle={'color': 'red'})
You can also change the theme, which is covered in the streamlit-aggrid docs).
There are a few other threads that cover this topic, but most recommend using JS to change the color:
Thanks for your answer!
Iām familiar with this but it only lets me color a whole column.
I want to be able to apply smart manipulations by coloring specific cells.
With pandas styler I can write it in python but in aggrid I can only write it in JSā¦ Because I havenāt learned enough js I would like to stick to pythonā¦
As I said pandas styler lets me do exactly what I want but it doesnāt work in streamlit-aggrid, only In st.dataframeā¦
Iād be grateful for your help!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.