title: Taking the unique values to a dataframe Pandas Python
body: <p>I have a dataframe in the following format.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Col1</th>
  <th>Col2</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>123</td>
  <td>abc</td>
  </tr>
  <tr>
  <td>123</td>
  <td>xyz</td>
  </tr>
  <tr>
  <td>111</td>
  <td>abc</td>
  </tr>
  <tr>
  <td>456</td>
  <td>abc</td>
  </tr>
  <tr>
  <td>456</td>
  <td>xyz</td>
  </tr>
  <tr>
  <td>456</td>
  <td>pqr</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I want to derive a dataframe as follows from the above dataset.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>abc</th>
  <th>xyz</th>
  <th>pqr</th>
  <th>abc, xyz</th>
  <th>abc, xyz, pqr</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>111</td>
  <td></td>
  <td></td>
  <td>123</td>
  <td>456</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>This is more like a combination problem but in Pandas,</p>