Python Pandas Conditional Formatting
#### Code Sample, a copy-pastable example if possible

def color_negative_red(val):
    color = 'red' if val < 10 else 'green'
    return 'color: %s' % color

df=df.style.applymap(color_negative_red)
df

#### Problem description

Hello there,

I wrote a few lines to assing numbers one of two colors based on their value. The problem is it does not work with floating point numbers. If I use floating numbers I get the following:

TypeError: ("'<' not supported between instances of 'str' and 'int'")

I works with whole number though! Does anybody know how I can make it work with floating number?

Thanks in advance an greetings


