title: How to add a column from various csv to a new csv with for loop
body: <p>Im trying to add a specific column from different dataframes ,everyone with different column name in  to a new dataframe in a loop, I just need one 'Date GMT' to this new DF as the index , so far only the last one is added to the new dataframe</p>
  <pre><code>
  def compile_data():
  
      for df in glob.glob(pathdf+'*.csv'):
          temp = pd.read_csv(df)
          
          temp.drop(['Date GMT','Open','High','Low','Volume'],axis=1, inplace=True)
          join = pd.DataFrame()
  
  
          result = pd.concat([join,temp],join='outer', axis=1)
          print(result.head())
  
          result.to_csv('joined.csv')
  
  
  
  compile_data()
  
  </code></pre>
  <p>This is the result I get</p>
  <pre><code>
   Date GMT,Last csv
  0,2020-08-25 00:00:00, 3
  1,2020-08-25 01:00:00, 4
  2,2020-08-25 02:00:00, 4
  3,2020-08-25 03:00:00, 5
  
  </code></pre>
  <p>This is how it should look (csv* is the column I want to get to the new DF)</p>
  <pre><code>Date GMT,csv1,csv2,csv3,csv4,csv5
  2020-08-25 01:00:00 , 10, 3.24, 40, 5, 15,
  2020-08-25 02:00:00 , 12, 3.26, 44, 7, 16,
  
  </code></pre>