title: Write multiple pandas dataframes to excel
body: <p>I am attempting to write multiple pandas <code>dataframes</code> which I extracted from a larger dataset into multiple worksheets of an excel workbook. The issue is that it only writes the first dataframe i.e. <code>index[0]</code>, so the resulting workbook has only one worksheet, see <code>sheet1</code> below. What am I missing? This is a recreation of my problem. </p>
  
  <p>Code:</p>
  
  <pre><code>import pandas as pd
  from pandas import ExcelWriter
  
  df_list = []
  a = pd.DataFrame({'A':[1,2,3,4,5,6,7,8,9], 'B':[10,11,12,13,14,15,16,17,18]})
  b = pd.DataFrame({'C':[11,22,33,44,55,66,77,88,99], 'D':[105,117,128,139,140,153,166,176,188]})
  
  df_list.append(a)
  df_list.append(b)
  
  writer = ExcelWriter('test_output.xlsx')
  for n, df in enumerate(df_list):
      df.to_excel(writer, 'sheet%s' % str(n + 1))
      writer.save()
  </code></pre>
  
  <p>Sheet1:</p>
  
  <pre><code>    A   B
  0   1   10
  1   2   11
  2   3   12
  3   4   13
  4   5   14
  5   6   15
  6   7   16
  7   8   17
  8   9   18
  </code></pre>