title: TypeError: to_excel() missing 1 required positional argument - despite using excel writer
body: <p>I've been having trouble saving to excel using pandas with the following error:</p>
  
  <pre><code>File "C:/Users/Colleen/Documents/Non-online code/kit_names.py", line 36, in save_sheet_names
  pd.DataFrame.to_excel(writer)
  </code></pre>
  
  <p>TypeError: to_excel() missing 1 required positional argument: 'excel_writer'
   here</p>
  
  <p>After having typed this:</p>
  
  <pre><code>    df =pd.DataFrame(arr)
  y=os.path.basename(os.path.normpath(path))
  new_path = r"C:\Users\Colleen\Documents\\"+y
  writer = pd.ExcelWriter(new_path, engine='xlsxwriter')
  pd.DataFrame.to_excel(writer)
  </code></pre>
  
  <p>Seemingly the writer is being used but evidently i have gone wrong somewhere! (I apologise if this is an obvious question as i am still getting my head around pandas)</p>
  
  <p>Pycharm is signalling a minor error which may be what is causing this however i don't understand what it means in truth and struggled to find a mention online. </p>
  
  <blockquote>
    <p>passing pandas.io.excel.excelwriter instead of pandas.core.frame.dataframe. Is this intentional?</p>
  </blockquote>
  
  <p>What do i need to do to fix this please?</p>