将样式保存到谷歌电子表格



我正在用gspread_dataframe,gspread将数据帧写入谷歌电子表格。我正在尝试为单元格指定黄色背景,这取决于熊猫样式的值。https://pandas.pydata.org/pandas-docs/stable/user_guide/style.html有没有办法将指定的背景颜色保存到谷歌电子表格中?感谢

有了这个,您可以使用gspread_formatting

from gspread_formatting import *
bGYellow = cellFormat(backgroundColor=color(1, 1, 0))
format_cell_range(worksheet, 'A1:E1', bGYellow)

请参阅gspread格式以了解更多详细信息

相关内容

最新更新