title: Pandas Add filename to a Excel combined file
body: <p>I have a code that combines multiple excel files in 1 file, but I need to add a column with the name of the file used (filename).</p>
  <p>Here is the code:</p>
  <pre><code>import os
  import pandas as pd
  cwd = os.path.abspath('') 
  files = os.listdir(cwd)  
  
  ## Code gets the first sheet of a given file
  df = pd.DataFrame()
  for file in files:
      if file.endswith('.xlsx'):
          df = df.append(pd.read_excel(file), ignore_index=True) 
  df.head() 
  df.to_excel('Combined.xlsx')
  </code></pre>
  <p>How do I do to add a column with the filename for each file used?</p>
  <p>Thanks</p>