title: How do I save a Pandas Dataframe object as a PDF after adding style to it?
body: <p>I have a Dataframe and have added styles to it to highlight portions, etc. and can render to HTML easily, but when attempting to save as a PDF, the styling is lost. Anyone have any tips? </p>
  
  <pre><code>import pandas as pd
  import numpy as np
  np.random.seed(24)
  df = pd.DataFrame({'A':np.linspace(1,10,10)})
  df = pd.concat([df, pd.DataFrame(np.random.randn(10, 4), columns=list('BCDE'))], axis=1)
  df.iloc[0, 2] = np.nan
  
  def color_negative_red(val):
      """
      Takes a scalar and returns a string with
      the css property `'color: red'` for negative
      strings, black otherwise.
      """
      color = 'red' if val &lt; 0 else 'black'
      return 'color: %s' % color
  
  s = df.style.applymap(color_negative_red)
  </code></pre>
  
  <p>I want to now take <code>s</code>, which is a <code>pandas.core.style.Styler</code> object and convert the DataFrame to a PDF while saving all of the formatting (highlighting negative numbers as red). Is there a simple way to do this or is the style mechanism in Pandas still under development? </p>