title: python groupby on a dictionary of dataframes
body: <p>I have a dictionary of dataframes:</p>
  
  <pre><code>list_of_dfs={'df1':'Dataframe','df2':'Dataframe','df3':'Dataframe','df4':'Dataframe'}
  </code></pre>
  
  <p>Each data frame contains the same variables (price, volume). I want to get the average of volume for each price observation that is repeated in every dataframe. To be more precise if we look just at one of the dataframes contained in the dictonary:</p>
  
  <pre><code>df = pd.DataFrame({
  'Price': [-3000, -262, 150, -3000, -262, 150, -3000, -262, 150],
  'Volume': [8133, 28287, 19289, 20242, 19428, 28322, 18147, 17234, 12133]})
  
  # I can use the groupby object on price, to calculate average of volume
  
  df_groupby_mean = df_filtered.groupby('Price')['Volume'].mean()
  print(df_groupby_mean)
  </code></pre>
  
  <p>I apply the following code to do the loop for all dataframes contained on my dictonary</p>
  
  <pre><code>promedios={k: df[df.groupby('Price')['Volume'].mean()] for k, df in list_of_dfs.items()}
  </code></pre>
  
  <p>However it appears the following error:</p>
  
  <p>KeyError: "None of [  ] are in the [columns]"</p>
  
  <p>Does anyone know why and how can I solve this problem? Thank you!</p>