title: How to generate permutations without repetition
body: <p>I have a table that looks like below</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Loc</th>
  <th>ID</th>
  <th>filter</th>
  <th>P1</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>A</td>
  <td>ABC1</td>
  <td>GHY</td>
  <td>55.6</td>
  </tr>
  <tr>
  <td>A</td>
  <td>DFT1</td>
  <td>FGH</td>
  <td>67.8</td>
  </tr>
  <tr>
  <td>B</td>
  <td>HJH5</td>
  <td>GHY</td>
  <td>67</td>
  </tr>
  <tr>
  <td>C</td>
  <td>HKL</td>
  <td>BHY</td>
  <td>78</td>
  </tr>
  <tr>
  <td>B</td>
  <td>GTY</td>
  <td>FGH</td>
  <td>60</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I want the output as below. Basically, I want the records with the same Filter to be one row</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Filter</th>
  <th>ID</th>
  <th>Loc</th>
  <th>P1</th>
  <th>m_ID</th>
  <th>m_Loc</th>
  <th>m_p1</th>
  <th>total</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>GHY</td>
  <td>ABC1</td>
  <td>A</td>
  <td>55.6</td>
  <td>HJH5</td>
  <td>B</td>
  <td>67</td>
  <td>122.6</td>
  </tr>
  <tr>
  <td>FGH</td>
  <td>DFT1</td>
  <td>A</td>
  <td>67.8</td>
  <td>GTY</td>
  <td>B</td>
  <td>60</td>
  <td>127.8</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Is this achievable using itertools i python. If yes can someone please suggest how can we do it?</p>