pandas to excel
填充色彩
datasave = dataFrame.style.background_gradient(cmap=‘RdBu’,low=1,high=1,axis=0)
datasave.to_excel(‘name.xlsx’)
RdBu是樣式,具體看https://matplotlib.org/examples/color/colormaps_reference.html
low和high控制色彩條的使用範圍,取正值。low是色彩條中心位置往左的偏移量,high往右
axis=0爲按列填充, 1爲按行填充