📜  streamlit color df - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:26.248000             🧑  作者: Mango

代码示例1
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)