title: Python: sum values of the third column if two columns have the same value
body: <p>I have the following dataframe <code>df</code></p>
  
  <pre><code>df
      a   b   i
  0   1.0 3.0 2.0
  1   1.0 3.0 3.0
  2   1.0 3.0 1.0
  3   1.0 3.0 3.0
  4   1.0 3.0 7.0
  5   1.0 3.0 8.0
  6   1.0 4.0 4.0
  7   1.0 4.0 0.0
  8   1.0 3.0 2.0
  9   1.0 3.0 1.0
  10  1.0 3.0 2.0
  </code></pre>
  
  <p>I want to make the sum over <code>i</code> for the same couple <code>a</code> and <code>b</code>, so</p>
  
  <pre><code>df2
      a   b   i
  0   1.0 3.0 31.0
  1   1.0 4.0 4.0
  2   1.0 3.0 0.0
  
  df2 = df2.groupby(['a', 'b']).sum(['i']).reset_index()
  </code></pre>