Answers for "streamlit color df"

0

streamlit color df

def bg_colour_col (col):
    colour = '#ffff00'
    return ['background-color: %s' % colour 
                if col.name=='Total' or i==4   # color column `Total` or row `4`
                else ''
             for i,x in col.iteritems()]

df.style.apply(bg_colour_col)
Posted by: Guest on May-10-2021

Browse Popular Code Answers by Language