小编Opt*_*rew的帖子

Conditional Styling in Pandas using other columns

I've searched and can't seem to find an answer on this anywhere, so hopefully it's possible. I have a dataframe, for simplicity I'll include an abbreviated version below. What I'd like to do is apply a custom formula for styling, or style one particular column based on the values in another column.

在此处输入图片说明

Using this as an example, I'd like to highlight the Current column's cells where the Diff > Historic Standard Dev in that row.

I've explored the style.apply approaches, …

python conditional-formatting styling pandas

6
推荐指数
1
解决办法
5372
查看次数

标签 统计

conditional-formatting ×1

pandas ×1

python ×1

styling ×1