title: Python - How to group equal terms two columns and add all terms in the 3rd column in a numpy matrix... using pandas or numpy?
body: <p>Matrix A:</p>
  <pre><code>    Count    First    Second
      0.5      1        a
      0.5      1        b
      1.0      1        b
      1.0      2        a 
      0.5      2        a 
      1.0      3        b     
  </code></pre>
  <p>I need to create a new matrix from an original matrix by identifying all rows with matching &quot;First&quot; and &quot;Second&quot; values. Group these rows together and add the values in the &quot;Count&quot; Column. &quot;Matrix B&quot; would be the end result of running the code on &quot;Matrix A&quot;:</p>
  <p>NEW - Matrix B</p>
  <pre><code>    Count    First    Second
      0.5      1        a
      1.5      1        b
      1.5      2        a 
      1.0      3        b  
  </code></pre>
  <p>Likely there is a simple method to perform this action. But I am at a loss right now. I currently working with a large numpy array.</p>