Skip to content
Advertisement

Using highlight_max and highlight_min from pandas.io.formats.style.Styler at the same time

I want to highlight the maximum value in each row as green and the minimum value as red.

JavaScript

But combining those 2 code like this :

JavaScript

give me this error

JavaScript

What is the correct way to use both of them? Thanks

Advertisement

Answer

And it turns out that I don’t need to call another style attribute. Will leave this for future readers who have the same problem with me :)

JavaScript

will work.

Advertisement