title: Adding up values in a 2D array in Python
body: <p>I have a numpy  2D array as follows</p>
  
  <pre><code>gona = array([['a1', 3], ['a2', 5], ['a3', 1], ['a3', 2], ['a3', 1], ['a1', 7]])
  </code></pre>
  
  <p>This array has 2 columns</p>
  
  <p>What I want to do is create an array with 2 columns. Column 1 should have 'a1' , 'a2', 'a3' values in its' rows and column 2 should have summation of those corresponding values. </p>
  
  <pre><code>new_gona = array([['a1', 10], ['a2', 5], ['a3', 4]])
  </code></pre>
  
  <p>Here, corresponding values are taken as follows.</p>
  
  <pre><code>'a1' : 3 + 7 = 10
  'a2' : 5 
  'a3' : 1 + 2 + 1 = 4
  </code></pre>
  
  <p>What would be an easy method to achieve this?</p>