title: create nice tables in excel with Python
body: <p>So i have this script that outputs a pandas dataframe which i can save to a notebook. These tables however arent professional looking and i was wondering if there was a way in pandas/excel writing modules that would allow me to add column headers to my columns , a legend, merge cells, add a title, etc.</p>
  
  <p>This is what i get from python as a pandas dataframe:<a href="https://i.stack.imgur.com/Z5kiy.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z5kiy.jpg" alt="enter image description here"></a></p>
  
  <p>with this script:</p>
  
  <pre><code>excel_df=pd.DataFrame(closeended_all_counts).T
  excel_df.columns=all_columns
  
  writer=pd.ExcelWriter('L:\OMIZ\March_2018.xlsx',engine='xlsxwriter')
  excel_df.to_excel(writer,'Final Tables')
  
  workbook = writer.book
  worksheet = writer.sheets['Final Tables']
  writer.save()
  </code></pre>
  
  <p>whereas i need this output:</p>
  
  <p><a href="https://i.stack.imgur.com/U1Ofb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U1Ofb.png" alt="enter image description here"></a></p>
  
  <p>any documentation or modules would be amazing!</p>