026_条件格式化

 

 

import pandas as pd
import seaborn as sns

# 表示数值大小 - 背景颜色深浅
color_map = sns.light_palette("green", as_cmap=True)
           
students = pd.read_excel("C:/Users/18124/Desktop/pandas/025_条件格式化/Students.xlsx", engine="openpyxl", index_col="ID")
students.style.background_gradient(color_map, subset=["Test_1", "Test_2", "Test_3"])

 

 

import pandas as pd
import seaborn as sns
           
students = pd.read_excel("C:/Users/18124/Desktop/pandas/025_条件格式化/Students.xlsx", engine="openpyxl", index_col="ID")
# 表示数值大小 - 背景颜色填充
students.style.bar(color="orange", subset=["Test_1", "Test_2", "Test_3"])

 

posted @ 2021-02-17 20:22  火焰马  阅读(82)  评论(0编辑  收藏  举报