I tried with cmap=sns.diverging_palette to set my table and the output is good, but I can't save/export it.
how I created it (took it from here Correlation heatmap)
cmap = cmap=sns.diverging_palette(5, 250, as_cmap=True)
def magnify():
return [dict(selector="th",
props=[("font-size", "7pt")]),
dict(selector="td",
props=[('padding', "0em 0em")]),
dict(selector="th:hover",
props=[("font-size", "12pt")]),
dict(selector="tr:hover td:hover",
props=[('max-width', '200px'),
('font-size', '12pt')])
cor.style.background_gradient(cmap='RdYlBu', axis=1)\
.set_properties(**{'max-width': '80px', 'font-size': '10pt'})\
.set_caption("Hover to magify")\
.set_precision(2)\
.set_table_styles(magnify())
#and then
filename = 'correlation.html'
f = open(filename,'w')
wrapper = cor.style.render()
f.write(wrapper)
f.close()
the html just shows the file like it is original, no colouring