title: Pandas: writing a Pivot Table with all its columns to excel
body: <p>I want to write a Pivot Table from pandas into a excel sheet but i lose one cell level of information and i coud not find a solution while browsing the web.</p>
  
  <p>Here is what i got in a pivot table made out ouf a DataFrame:</p>
  
  <pre><code>T-Class     &lt;00.5   &lt;01.0
  ZIP         
  0   1375.0  762.0
  1   2177.0  913.0
  </code></pre>
  
  <p>when i write it to excel i lose the the cell 'T-Class' with its corresponding empty row for 'ZIP' this is what i get using the xlsx writer:</p>
  
  <pre><code>ZIP &lt;00.5   &lt;01.0
  0   1375    762
  1   2177    913
  </code></pre>
  
  <p>example code for writing to excel:</p>
  
  <pre><code>writer = pd.ExcelWriter('data.xlsx', engine='xlsxwriter')
  df.to_excel(writer, sheet_name='pivottable',header = True,index=True)
  writer.save()
  </code></pre>
  
  <p>How to fix this issue?</p>