title: How do I create multiple data frames using a for loop in python
body: <p>I'm trying to make multiple dataframes that are subsets of existing dataframes.</p>
  
  <p>I have <code>df_list</code> which is actually a list of datasets:</p>
  
  <pre class="lang-py prettyprint-override"><code>df_list = [df1B, df2B, df3B, df4B, df5B, df6B, df7B, df8B, df9B, df10B, df11B, df12B, df13B, df14B, df15B, df16B, df17B, df18B, df19B, df20B, df21B, df22B, df23B, df24B, df25B, df26B, df27B, df28B, df30B, df31B, df32B, df33B, df34B, df35B]
  </code></pre>
  
  <p>If I want to make a subset of a single data set I do this and it works:</p>
  
  <pre class="lang-py prettyprint-override"><code>df2B = df2B.groupby(['Location']).get_group(36)
  </code></pre>
  
  <p>It takes all locations with number 36, but when I try to do it for all the data sets in a for loop it doesn't work</p>
  
  <pre class="lang-py prettyprint-override"><code>for df in df_list:
      df = df.groupby(['Location']).get_group(36)
  </code></pre>
  
  <p>But this is not making it for each dataset. It doesn't show any error message but it doesn't do anything else either :( </p>
  
  <p>Should I just write the same line 35 times ??? I hope I have a better option.</p>