We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
# Instead of df.style.applymap(lambda val: 'color: %s' % 'red' if val < 0 else 'black')
It would be
df.style.where(lambda val: val < 0, 'color: red', 'color: black')