title: Apply CSS class to Pandas DataFrame using to_html
body: <p>I'm having trouble applying "classes" argument with Pandas "to_html" method to style a DataFrame.</p>
  
  <p>"classes : str or list or tuple, default None
  CSS class(es) to apply to the resulting html table"
  from: <a href="https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.to_html.html" rel="noreferrer">https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.to_html.html</a></p>
  
  <p>I am able to render a styled DataFrame like this (for example):</p>
  
  <pre><code>df = pd.DataFrame([[1, 2], [1, 3], [4, 6]], columns=['A', 'B'])
  
  myhtml = df.style.set_properties(**{'font-size': '11pt', 'font-family': 'Calibri','border-collapse': 'collapse','border': '1px solid black'}).render()
  
  with open('myhtml.html','w') as f:
      f.write(myhtml)        
  </code></pre>
  
  <p>How can I style html output from a DataFrame using "classes" with "to_html" like this:</p>
  
  <pre><code>df.to_html('myhtml.html',classes=&lt;something here&gt;)
  </code></pre>