title: how to add row in DataFrame iteratively updating it after each for loop in python preferably in pandas
body: <p>This is my .csv file </p>
  
  <pre><code>Choco_Type,ID,Cocoa,Milk,Sugar,ID,Cocoa,Milk,Sugar 
  Dark,Batch_11,80,0,16,Batch_12,78,0,14 
  Milk,Batch_72,35,25,25,Batch_73,32,27,22 
  Swiss,Batch_52,30,30,20,Batch_53,28,33,18
  </code></pre>
  
  <p>This is my code</p>
  
  <pre><code>for row in reader_in:
      type_chocolate=row[0]
      a= [(type_chocolate,row[1],row[2],row[3],row[4]),(type_chocolate,row[5],row[6],row[7],row[8])]
      df=DataFrame.from_records(a)
  </code></pre>
  
  <p>this should be my output DataFrame</p>
  
  <pre><code>Choco_Type   ID  Cocoa  Milk Sugar  
  Dark    Batch_11    80  0   16  
  Dark    Batch_12    78  0   14  
  Milk    Batch_72    35  25  25  
  Milk    Batch_73    32  27  22  
  Swiss   Batch_52    30  30  20  
  Swiss   Batch_53    28  33  18      
  </code></pre>
  
  <p>I am unable to understand how to update the DataFrame'df' after each 'for' loop with new rows which are updated by using 'from_records' function which takes a list of iterables from the reader_in as it's input</p>