title: ValueError: Invalid file path or buffer object type: <class 'list'>
body: <p>Im new in python, need help in my code, please. I am trying to append data from multiple excel files to one file. But something goes wrong...</p>
  <pre><code>import pandas as pd
  import argparse
  import os
  
  parser = argparse.ArgumentParser(description=&quot;extract data from machine&quot;)
  
  parser.add_argument(&quot;-d&quot;,&quot;--data&quot;, dest=&quot;data&quot;, required =True, action = &quot;store&quot;, type=argparse.FileType(&quot;r&quot;, encoding=&quot;latin-1&quot;), nargs=&quot;+&quot;,
                       help=&quot;the excel file you want to analysis&quot;)
  parser.add_argument(&quot;-o&quot;,&quot;--outFileNamePrefix&quot;,action=&quot;store&quot;,default=&quot;foo&quot;,dest=&quot;out&quot;,
                      help=&quot;the output file name&quot;)
  args = parser.parse_args()
  
  output = pd.DataFrame(columns=['Target','Sample','SQ Mean', 'SQ Std. Dev'])
  output.to_excel(&quot;%s_%s.xlsx&quot;%(args.out), index=False)
  filenames = args.data
  for filename in filenames:
      for line in filename:
          data = pd.read_excel(args.data)
          data = data.to_excel(os.path.join(&quot;%s_%s.xlsx&quot;%(args.out)))
  </code></pre>
  <p>I have this error</p>
  <pre><code>ValueError: Invalid file path or buffer object type: &lt;class 'list'&gt;
  </code></pre>
  <p>Any suggestions will be helpful, please!</p>