title: Finding the rows which has a unique column values in python
body: <pre><code>1 1 0 0 0 1 0 0 0
  0 1 0 0 0 0 0 0 0
  0 1 0 0 0 0 0 0 0
  1 0 1 0 0 0 0 0 0
  0 0 0 0 0 0 1 1 1
  1 0 0 1 1 0 0 0 0
  </code></pre>
  
  <p>I have a dataframe of the above structure. I want to get the columns which has a column sum of 1. The columns should be combined together if they have 1's for the same row. So if we see the above example we should get column <code>[3],[4,5],[6],[7,8,9]</code> as output. I tried doing<code>df.columns[df.sum(axis=0) == 1]</code> but instead of getting them in group(when they have same row's) I am getting them as individual...</p>