title: Find sum of the column values based on some other column
body: <p>I have a input file like this:</p>
  <pre><code>j,z,b,bsy,afj,upz,343,13,ruhwd
  u,i,a,dvp,ibt,dxv,154,00,adsif
  t,a,a,jqj,dtd,yxq,540,49,kxthz
  j,z,b,bsy,afj,upz,343,13,ruhwd
  u,i,a,dvp,ibt,dxv,154,00,adsif
  t,a,a,jqj,dtd,yxq,540,49,kxthz
  c,u,g,nfk,ekh,trc,085,83,xppnl
  </code></pre>
  <ol>
  <li>For every unique value of <strong>Column1</strong>, I need to find out the sum of <strong>column7</strong></li>
  <li>Similarly, for every unique value of <strong>Column2</strong>, I need to find out the sum of <strong>column7</strong></li>
  </ol>
  <p>Output for 1 should be like:</p>
  <pre><code>j,686
  u,308
  t,98
  c,83
  </code></pre>
  <p>Output for 2 should be like:</p>
  <pre><code>z,686
  i,308
  a,98
  u,83
  </code></pre>
  <p>I am fairly new in Python. How can I achieve the above?</p>