Conditional Formatting Error using IPYWidgets table

Hi all,

I’m trying to highlight all negative string values on the table below but I’m getting an error that i’m sure is because of the string formatting. Any ideas how I can modify the code to highlight the negative strings on the table?

def in_statements(val):
for statement in df2['Daily_Returns_Pct']:
    if statement in val:
        color = 'red'
        if val < -1 : color = 'red'
return 'background-color: %s' % color

df2['Daily_Returns_Pct'] =
    ~/miniconda3/envs/Jlab/lib/python3.7/site-packages/ipykernel/ in json_clean(obj)
    196     # we don't understand it, it's probably an unserializable object
    --> 197     raise ValueError("Can't clean for JSON: %r" % obj)

    ValueError: Can't clean for JSON: < object at 0x11c53cf98>