title: How to append multiple pandas DataFrames in a loop?
body: <p>I've been banging my head on this python problem for a while and am stuck. I am for-looping through several csv files and want one data frame that appends the csv files in a way that one column from each csv file is a column name and sets a common index of a date_time. </p>
  
  <p>There are 11 csv files that look like this data frame except for different <code>value</code> and <code>pod</code> number, but the <code>time_stamp</code> is the same for all the csvs. </p>
  
  <p><code>data</code></p>
  
  <pre><code>    pod time_stamp  value
  0   97  2016-02-22  3.048000
  1   97  2016-02-29  23.622001
  2   97  2016-03-07  13.970001
  3   97  2016-03-14  6.604000
  4   97  2016-03-21  NaN
  </code></pre>
  
  <p>And this is the for-loop that I have so far:</p>
  
  <pre><code>import glob
  import pandas as pd
  
  filenames = sorted(glob.glob('*.csv'))
  
  new = []
  
  for f in filenames:
      data = pd.read_csv(f)
  
      time_stamp = [pd.to_datetime(d) for d in time_stamp]
  
      new.append(data)
  
  my_df = pd.DataFrame(new, columns=['pod','time_stamp','value'])
  </code></pre>
  
  <p>What I want is a data frame that looks like this where each column is the result of <code>value</code> from each of the csv files. </p>
  
  <pre><code>time_stamp  97        98       99 ...
  2016-02-22  3.04800   4.20002  3.5500
  2016-02-29. 23.62201  24.7392  21.1110
  2016-03-07 13.97001   11.0284  12.0000
  </code></pre>
  
  <p>But right now the output of <code>my_df</code> is very wrong and looks like this. Any ideas of where I went wrong?</p>
  
  <pre><code>    0
  0   pod time_stamp value 0 22 2016-...
  1   pod time_stamp value 0 72 2016-...
  2   pod time_stamp value 0 79 2016-0...
  3   pod time_stamp value 0 86 2016-...
  4   pod time_stamp value 0 87 2016-...
  5   pod time_stamp value 0 88 2016-...
  6   pod time_stamp value 0 90 2016-0...
  7   pod time_stamp value 0 93 2016-0...
  8   pod time_stamp value 0 95 2016-...
  </code></pre>