title: Loop Through Pandas Dataframe and split into multiple dataframes based on unique column values
body: <p>I have a dataframe saved in a list. Is there a way to loop through the list to create separate dataframes based of a column value?</p>
  <p>ex: Turn this</p>
  <p>df</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>ID</th>
  <th>Colour</th>
  <th>Transport</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>0902</td>
  <td>red</td>
  <td>car</td>
  </tr>
  <tr>
  <td>0902</td>
  <td>blue</td>
  <td>car</td>
  </tr>
  <tr>
  <td>0105</td>
  <td>red</td>
  <td>car</td>
  </tr>
  <tr>
  <td>0105</td>
  <td>yellow</td>
  <td>car</td>
  </tr>
  <tr>
  <td>0105</td>
  <td>orange</td>
  <td>boat</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>To this:</p>
  <p>df1</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>ID</th>
  <th>Colour</th>
  <th>Transport</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>0902</td>
  <td>red</td>
  <td>car</td>
  </tr>
  <tr>
  <td>0902</td>
  <td>blue</td>
  <td>car</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>df2</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>ID</th>
  <th>Colour</th>
  <th>Transport</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>0105</td>
  <td>red</td>
  <td>car</td>
  </tr>
  <tr>
  <td>0105</td>
  <td>yellow</td>
  <td>car</td>
  </tr>
  <tr>
  <td>0105</td>
  <td>orange</td>
  <td>boat</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I have searched for a way to do this but can't find it. Any ideas?</p>