title: How am I able to separate a DataFrame into many DataFrames, based on a label and then do computation for each DataFrame?
body: <p>I have the following DataFrame:</p>
  <p><img src="https://i.stack.imgur.com/ISzkd.png" alt="1" /></p>
  <p>I am trying to make one DataFrame for each unique value in df1['Tub']. Right now I am creating a dictionary and trying to append to each new DataFrame instances where there is a matching Tub. I think my logic is on the right track.</p>
  <pre><code>tub_df = {}
  
  tubs = []
  
  for tub in df1['Tub']:
      if tub not in tubs:
          tubs.append(tub)
  #['Tub 1', 'Tub 2', 'Tub 3']
  
  for tub_name in tubs:
      for tub_row in df1['Tub']:
          if tub_row == tub_name:
              tub_df[tub] = pd.DataFrame.copy(df1.loc[tub_row])
  </code></pre>
  <p>Thank you for any help.</p>