【发布时间】:2019-11-19 12:47:50
【问题描述】:
我在 pandas 中有一个数据框,其中包含多个列。如果条件与 C 列中的条件匹配,我的任务是对 A 列中的特定单元格进行颜色编码。 enter image description here
我附上了一个例子。 我想对 C 列应用三个不同的条件
1. If Column C = poor than Column A = red color
2. If Column C = good then Column A = Orange color
3. If Column C = very good then Column A = Green color
提前致谢!
【问题讨论】:
-
到目前为止您尝试过什么?请查看How To Ask a good question 和Help-Center,了解如何提问。
标签: python pandas dataframe styles