I have pandas dataframe, and I would like to give a background gradient color based on absolute value.Imagine, my desire value is 6 in column A in the data frame. As number move from desire value, background gradient color changes on both directions same by absolute value (regardless to positive and negative direction).
The following post comes to close what I want, but these case color does not consider absolute value.pandas style background gradient both rows and columns,also pandas documentation http://pandas.pydata.org/pandas-docs/stable/user_guide/style.html
I have created minimum code:
import pandas as pd
colum1 = [-1,0,1,2,3,4,5,6,7,8,9,10,11,12]
df = pd.DataFrame(data=colum1,columns=["A"])
I have created expected output as image in the excel. I would like to get similar output from code. background gradient change by absolute valye