I am trying to create a diverging red-green formatting for my pandas dataframe. Specifically, I want any value below 0 to be red, and any value above 0 to be green (& the higher the value, the darker green the cell ... and vice versa).
Currently, I cannot find a way to center this around 0. See below for a quick example of my code and a screenshot of my current output.
Thanks!
rdgn = sns.diverging_palette(h_neg=0, h_pos=112, s=68, l=50, sep=10,n=9, as_cmap=True)
s = test.style.background_gradient(rdgn).set_precision(2)