I have the following dataframe: [1]: https://i.stack.imgur.com/wBi6V.png
I used the following code to highlight the max values of every cell:
def highlight_max(s):
try:
is_max = s == s.max()
return ['background-color: red' if v else '' for v in is_max]
except TypeError:
pass
except KeyError:
pass
s = df.style.apply(highlight_max, axis=1)
s
But I just want to apply this formatting to a certain row, for example the row 'Book Value Per Share (mrq)'. I can't find any code that helps me with this!!!
Anyone knows?