title: How to make a list of dataframe from a given list with specific headers
body: <p>I am tyring to <code>group by</code> on column <code>brands</code> in a <code>dataframe</code> where a <code>column</code> carrier is equal to a string <code>DHL</code> :</p>
  <p>main_df:</p>
  <pre><code>Carrier,brand,store,order_id,tracking_id
  DHL,HP,UK,2722,67920
  USP,HP,UK,2918,17820
  DHL,HP,US,2122,47920
  DHL,DELL,SG,17229,75127
  USP,HP,UK,2908,67820
  DHL,DELL,UK,2201,24520
  </code></pre>
  <p>I am trying to get this output(splitting on column 'brands') :</p>
  <p>split_df1:</p>
  <pre><code>DHL,HP,UK,2722,67920
  DHL,HP,US,2122,47920
  </code></pre>
  <p>split_df2:</p>
  <pre><code>DHL,DELL,SG,17229,75127
  DHL,DELL,UK,2201,24520
  </code></pre>
  <p>this is my code</p>
  <pre><code>def split_csv():
      print(base_path)
      tracking_df = pd.read_csv(os.path.join(base_path,tracking_ids_csv))
      carrier_split_df = tracking_df.loc[tracking_df['Carrier']=='DHL']
      headers = carrier_split_df.columns.tolist()
      print(headers)
      brand_split_df = [index[1] for index in carrier_split_df.groupby(['brand'])] 
      for i in range(len(brand_split_df)): # This gives me a list
          print(brand_split_df[i])
      df = pd.DataFrame()
      for i in range(len(brand_split_df)):
          df[i] = pd.DataFrame(brand_split_df[i],columns=headers) # error here
      return df[i]
  </code></pre>
  <p>this <code>for loop</code> gives me the correct output, but its in a <code>list</code>,
  how do i make this list into separate <code>dataframes</code> ?</p>
  <pre><code>for i in range(len(brand_split_df)): # This gives me a list
          print(brand_split_df[i])
  </code></pre>
  <p>output:</p>
  <p>split_df1:</p>
  <pre><code>DHL,HP,UK,2722,67920
  DHL,HP,US,2122,47920
  </code></pre>
  <p>split_df2:</p>
  <pre><code>DHL,DELL,SG,17229,75127
  DHL,DELL,UK,2201,24520
  </code></pre>