📅  最后修改于: 2022-03-11 15:00:26.248000             🧑  作者: Mango
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)