title: Writing name of file with data in a single frame Python
body: <p>I have a dataframe that is length (141,2) with a repetition of Year and Month that I have stripped from files in a folder that just looks like:</p>
  
  <pre><code>Year          Month
  2017            1
  2017            1
  2017            1
  2017            1
  2017            1
  2017            1
  2017            1
  .
  .
  </code></pre>
  
  <p>Each file that I stripped from has around (20000, 6) rows and I want to repeat the Year and Month on each of the files.</p>
  
  <p>I take a list in for the files from the directory to strip the year and months like:</p>
  
  <pre><code>path = os.path.join(os.getcwd(),'C:\\.....')
  files = [os.path.join(path,i) for i in os.listdir(path) if os.path.isfile(os.path.join(path,i))]
  </code></pre>
  
  <p>And then from the list <code>files</code> I just iterate through each file like:</p>
  
  <pre><code>for file in files:
      df['Year'] = os.path.split(file)[1]
      df['Year'] = df['Year'].map(lambda x: str(x)[:-6])
  </code></pre>
  
  <p>How can I just write the entire file to a dataframe and join these dates I've stripped in repetition to the entire length of the file?</p>
  
  <p>Ie: Make the (141,2) dataframe just append and become a (20000,2) frame?</p>