Chaptor11styling

‘’’

df = df.tail(7)

def colour_rednegative(x):

color = ‘red’ if x<0 else ‘white’ return 'colour: ’ + color

df.style.applymap(colour_rednegative)

‘’’

This code is not working for me

What’s the error that you’re facing?

ValueError: style is not supported for non-unique indices.

I get this error

Maybe below link will help you

It has worked now, the error was different however, thank you so much.