title: Iterate through folders and find a file to put into a dataframe
body: <p>I have a directory <code>../customer_data/*</code> with 15 folders. Each folder is a unique customer.</p>
  <p>Example: <code>../customer_data/customer_1</code></p>
  <p>Within each customer folder there is a csv called <code>surveys.csv</code>.</p>
  <p>GOAL: I want to iterate through all the folders in <code>../customer_data/*</code> and find the <code>surveys.csv</code> for each unique customer and create a concatenated dataframe. I also want to add a column in the dataframe where it has the customer id which is the name of the folder.</p>
  <pre><code>import glob
  import os
  rootdir = '../customer_data/*'
  dataframes = []
  for subdir, dirs, files in os.walk(rootdir):
      
      for file in files:
          csvfiles = glob.glob(os.path.join(rootdir, 'surveys.csv'))
          
          # loop through the files and read them in with pandas
           # a list to hold all the individual pandas DataFrames
        
          df = pd.read_csv(csvfiles)
          df['customer_id'] = os.path.dirname
          dataframes.append(df)
              
  # concatenate them all together
  result = pd.concat(dataframes, ignore_index=True)
  result.head()
  
  </code></pre>
  <p>This code is not giving me all 15 files. Please help</p>