有没有可能在pandas数据帧中基于整数位置定义特定单元格的颜色,例如测向仪[1,1]熊猫造型?https://pandas.pydata.org/pandas-docs/stable/style.html
像下面这样的东西会很好,但不起作用。在
def style_specific_cell(val):
color = 'lightgreen'
val.iloc[2, 8] = color
return XYZ
df = df.style.applymap(style_specific_cell, subset=['Column1']
将^{} 与样式的助手
DataFrame
一起使用:示例
^{pr2}$DataFrame
:相关问题 更多 >
编程相关推荐