title: Trailing zeros for rounded Pandas DataFrame after applying style
body: <p>I would like to have all numbers rounded to two decimal places in my pandas table which I'm looking to visualise. When I do <code>df.round(2)</code> I get the desired output:</p>
  <p><a href="https://i.stack.imgur.com/ksJ70m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ksJ70m.png" alt="Rounded to 2 decimal places as desired" /></a></p>
  <p>However, when I then apply a conditional styling to this table, I end up with trailing zeros.</p>
  <pre><code>df.round(2).style.apply(lambda x: ['background: cyan' if 1&gt;x['target'] else 'background: yellow' for v in x], axis=1)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/Qi51Dm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Qi51Dm.png" alt="Undesired: Leading zeros" /></a></p>
  <p>Any ideas how I can get rid of the trailing zeros while applying the conditional background style? Thanks in advance.</p>