Using in streamlit-aggrid

I figured out that I can color the background cells of my streamlit table using
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?

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.