title: pandas dataframe to_html formatters - can't display image
body: <p>Im trying to add an up and down arrow to a pandas data frame with to_html for an email report.</p>
  
  <p>I'm using a lambda function to input an up and down arrow onto column values in my data frame, I know the image html works ok becasue I can put it in the body of the email and it works fine but when I use this function and the pandas formatter it outputs like in the below image (ps. i know the CID is different to whats in my function, I was just tesing something) </p>
  
  <p>Any one have any idea why? Or anyone have a better way to do it?</p>
  
  <p><a href="https://i.stack.imgur.com/baJ2n.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/baJ2n.png" alt="pandas formatter error"></a></p>
  
  <p>call:</p>
  
  <pre><code>worst_20_accounts.to_html(index=False,formatters={'Last Run Rank Difference': lambda x: check_html_val_for_arrow(x)}))
  </code></pre>
  
  <p>function:</p>
  
  <pre><code>def check_html_val_for_arrow(x):
      try:
          if x &gt; 0:
              return str(x) + ' &lt;img src="cid:image7"&gt;'
          elif x &lt; 0:
              return str(x) + ' &lt;img src="cid:image8"&gt;'
          else:
              return str(x)
      except:
          return str(x)
  </code></pre>