I want to use the color coding from a pandas style object and apply the exact same coloring to the corresponding cells in another dataframe with the same size. The data is different in the two dataframes which means i can not use the same styling function.
I have tried using style.render() from the style object with the desired color and then apply it to the new dataframe. This did not work for me though.
EDIT: I have posted a picture below of what i have tried to do. In the picture i use the .render() method to get the HTML of the dataframe with the color coding and apply it to a new dataframe, but without success.
style1=df1.style.apply(highlight_max),style2 = df2.style,style2.use(style1.export())thenstyle2?