I have this DataFrame:
import pandas as pd
df = pd.DataFrame({'2021-04': {'2021-04': 100.0, '2021-05': float("nan"), '2021-06': float("nan")},
'2021-05': {'2021-04': 9.599326432568967, '2021-05': 100.0, '2021-06': float("nan")},
'2021-06': {'2021-04': 7.952995602884856,
'2021-05': 5.549312064243707,
'2021-06': 100.0}})
I want to make a heatmap plot of it by line, but ignoring the max values, since they are much higher than the other values.
I also want to give the nans a light color, like white, but I got this part got right.
This is what I got so far:
df.style.background_gradient(cmap ='RdYlGn', axis=1)\
.highlight_null(null_color='white')
Which produces this table:
How can I apply the gradient ignoring the values equal to 100?