title: Multiple csv files into one DataFrame and add new column based on file name
body: <p>I have a lot of csv files that data structure is the same. Names of the files contain a few characters letters that I would like to use and create based on them new column. So it should looks like:
  Names of files:</p>
  <pre><code>x_OHO.csv
  x_MCH.csv
  y_OHO.csv
  y_MCH.csv
  c_OHO_2.csv
  c_MCH_2.csv
  </code></pre>
  <p>Those files has 2 columns and I would like to create a new with the same values (OHO or MCH). So I read first file x_OHO.csv and I add new column with values: &quot;OHO&quot;, then I read next file and add value &quot;MCH&quot; and etc. After all it should be one file.</p>
  <p>I have a code that concat all files but without new column. Do you have any idea how I could fix my code?</p>
  <pre><code>import glob
  import pandas as pd
  
  df = pd.concat(map(pd.read_csv, glob.glob('data/*.csv')))
  </code></pre>
  <p>Regards
  Tomasz</p>