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)
    )
st.dataframe(
                                    input_change_ptp.head().style.apply(
                                        color_coding_change_flag, axis=1
                                    ),
                                    height=1600,
                                    # hide_index=True
                                )

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

image

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.

Thanks!