title: Formatting Datetime Index with Pandas DataFrame Styler, to only show time-part
body: <p>I'm using the style property of Pandas DataFrames to create HTML tables for emailing.</p>
  <p>The issue I am having is that I have <strong>a datetime index that shows up as a datetime stamp when I'd like it to show as a date instead. I'm not interested in the time part</strong>. In the interpreter, the DataFrame does print out correctly (only shows the date part). But when I render after stylizing using the style property of the table, it generates HTML that puts out the time part as well. I've looked into using <code>style.format()</code> but I can't access the index column.
  I would reset the index in order to make the datetime column a normal column... but my header columns are MultIndex. If I flatten out and don't use indexes the table looks weird.</p>
  <p>Unfortunately I found this in the .style documentation:</p>
  <blockquote>
  <p><em><strong>Limitations</strong></em></p>
  <ul>
  <li>DataFrame only (use <code>Series.to_frame().style</code>)</li>
  <li>The index and columns must be unique</li>
  <li>No large repr, and performance isn’t great; this is intended for summary DataFrames</li>
  <li>You can only style the values, not the index or columns</li>
  <li>You can only apply styles, you can’t insert new HTML
  entities Some of these will be addressed in the future.</li>
  </ul>
  <p>https://pandas.pydata.org/pandas-docs/stable/style.html#Limitations</p>
  </blockquote>
  <p>I'm posting to see if anyone has any ideas for how I can get around this. Thanks!</p>
  <p>Example table that shows the issue:
  <a href="https://htmlpreview.github.io/?https://gist.githubusercontent.com/aleksarias/78b67b61ca4f0543f5fba4705caf2fd8/raw/f78527a38c650121108161492c779b97af126907/html_sample.html" rel="nofollow noreferrer">example_table_link</a></p>
  <p>Code for generating table:</p>
  <pre><code>account_day_df = merged[['Day', 'Metric1', 'Metric2', 'Metric3', 'Metric4', 'Campaign type']]
  account_day_df = account_day_df.groupby(['Day', 'Campaign type']).sum()
  account_day_df.loc[:, 'Metric5'] = account_day_df['Metric1'] / account_day_df['Metric4']
  account_day_df = account_day_df.unstack('Campaign type')
  
  html += (
      account_day_df.style
          .background_gradient(cmap=cm, subset=['Metric5'])
          .set_table_attributes('border=&quot;1&quot; class=&quot;dataframe table table-hover table-bordered&quot;')
          .render(i)
  )
  </code></pre>