I want to highlight some values in some columns of a pandas dataframe. I have this code to do it: Sample dataframe:
Name ID Name_1 ID.1
0 cat 98.4 dog 98.4
1 cat.1 96.5 dog.1 96.5
2 cat.3 95.4 dog.3 95.4
def color_negative_red_1(value):
if value <= 96.5:
color='red'
elif value == 97.5:
color='blue'
else:
color='black'
return ['background-color: red']
df_1.style.applymap(color_negative_red_1,subset=['ID','ID.1'])
Here is how it should look:
but there aren't any changes in my excell file...

<= 96.5means less than equal to 96.5