St.dataframe with color coding has cells in black

I am exploring using the st.dataframe component, and color the row if the ‘If Input Change’ column = ‘Change’. The table has all blacks in all rows except the 1st row.

streamlit version = 1.29.0

    return (
        ["background-color:antiquewhite"] * len(row)
        if row["If Input Change"]
        in ["Change"]
        else ["background-color:white"] * len(row)
                                        color_coding_change_flag, axis=1
                                    # hide_index=True

The similar code works on a different table but didn’t work on this one.


Hi @Eva_S

Thanks for sharing code snippet however it would be helpful to also share additional code on the dataframe that works and did not work. This would be helpful in reproducing the issue and help the community in identifying a solution.


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