如何根据给定的条件将 df.style 用于 DataFrame 的子集?
df = DataFrame({'A':[3,4,5],'B':[9,10,15],'C':[3,4,5]})
df
A B C
0 3 9 3
1 4 10 4
2 5 15 1
df1 = df.eq(df.iloc[:, 0], axis=0)
df1
A B C
0 True False True
1 True False True
2 True False True
我想突出显示它为 False 的单元格。但是对 df 进行更改,而不仅仅是 df1
已编辑问题。它与前面的问题不同,因为它们只处理元素着色。但我想根据上述条件着色。