title: Writing into Excel by using Pandas Dataframe
body: <p>I'm very new to programming and I'm just starting out to try. So sorry if my question comes off as too basic. I'm currently trying to extract columns of data from 1 excel sheet to be written into an output excel sheet. However, after I have extracted the column, I am unable to write it into my output sheet as I get the error:
  <code>AttributeError: 'list' object has no attribute 'to_excel'</code></p>
  
  <p>Below is my code: </p>
  
  <pre><code>import pandas as pd
  
  #Read data from input excel
  sourcepath = pd.read_excel("path to input excel",indexcol=0)
  
  #extract data from input excel
  col1 = list(sourcepath.iloc[1:345,0])
  col1 = [str(x)for x in col1]
  
  #write data into output excel
  extractpath = "path to output excel"
  writer = pd.ExcelWriter(extractpath,engine='xlsxwriter')
  col1.to_excel(writer,'Sheet1',index=True)
  
  writer.save()
  </code></pre>
  
  <p>I'm also not sure if the line <code>col1 = [Str(x) for x in col1]</code>is even required at all for this code? I copied it off the net and not really sure the use of this.</p>
  
  <p>Thank you very much for your help! Greatly appreciated &lt;3</p>