title: Group by value of sum of columns with Pandas
body: <p>I got lost in Pandas doc and features trying to figure out a way to  <code>groupby</code> a <code>DataFrame</code> by the values of the sum of the columns.</p>
  
  <p>for instance, let say I have the following data : </p>
  
  <pre><code>In [2]: dat = {'a':[1,0,0], 'b':[0,1,0], 'c':[1,0,0], 'd':[2,3,4]}
  
  In [3]: df = pd.DataFrame(dat)
  
  In [4]: df
  Out[4]: 
     a  b  c  d
  0  1  0  1  2
  1  0  1  0  3
  2  0  0  0  4
  </code></pre>
  
  <p>I would like columns <code>a</code>, <code>b</code> and <code>c</code> to be grouped since they all have their sum equal to 1. The resulting DataFrame would have columns labels equals to the sum of the columns it summed. Like this :</p>
  
  <pre><code>   1  9
  0  2  2
  1  1  3
  2  0  4
  </code></pre>
  
  <p>Any idea to put me in the good direction ? Thanks in advance !</p>