title: Looping over a list of pandas data frames and create a new data frame
body: <p>I have a list of data frames:</p>
  
  <pre><code>data_frames = [sort,sort1,sort2]
  </code></pre>
  
  <p>I'd like to iterate over them and store some stats in a new <code>df</code>. I feel like this is something trivial but the function below returns an empty data frame <code>df_concat = df_stats(data_frames)</code>. What am I missing? Will appreciate your help.</p>
  
  <p>Create an example data set:</p>
  
  <pre><code>import pandas as pd
  data = {'number': [23,56,89], 'PVs': [23456, 34456, 6789]}
  sort = pd.DataFrame.from_dict(data)
  data1 = {'number': [28,52,12], 'PVs': [3423456, 2334456, 36789]}
  sort1 = pd.DataFrame.from_dict(data1)
  data2 = {'number': [123,5,86], 'PVs': [2345655, 934456, 16789]}
  sort2 = pd.DataFrame.from_dict(data2)
  </code></pre>
  
  <p>The function to iterate over data frames:</p>
  
  <pre><code>def df_stats(data_frames):
      df = pd.DataFrame()
      for data in data_frames:
          df['Number'] = data.number.count()
          df["Total PVs"] = '{0:,.0f}'.format(data.PVs.sum())
          df["Average"] = '{0:,.0f}'.format(data.PVs.mean())
          df["Median"] = '{0:,.0f}'.format(data.PVs.median())
      return df
  </code></pre>