title: Generate heatmap using Pandas and Weasyprint
body: <p>I have a pandas data frame , which I am trying to render as a PDF using Weasyprint. For other formatting changes , I have used 'column formatters' and modified the underlying HTML. </p>
  
  <pre><code>int_frmt = lambda x: '&lt;div style="text-align:right"&gt;%s&lt;/div&gt;' % '{0}'.format(int(round(x))) 
  frmt = {col: int_frmt for col in df.columns if df.dtypes[col] in [np.dtype('int64'), np.dtype('float64')]}
  </code></pre>
  
  <p>How can I add a Heatmap to the PDF in the same manner ( by modifying the underlying HTML )?</p>
  
  <p>One way of doing this, which I could think, is to generate a separate pandas dataframe which contains all the color information, and then superimpose the two frames by iterating over all the values and modifying each cell individually.</p>
  
  <p>I am looking for a more direct and comprehensive solution, or an API, of the like we have in Matplotlib, Seaborn ( heatmap() function ).</p>
  
  <p>Thanks a lot.</p>