join/search/sum in Pandas Python
<p>i'm new to Panda and trying to learn it, I have a DataFrame in Panda with 3 different columns:</p>

<pre><code>   a             b         c
-----------------------------
'     Alice   5/5/2014     2 '
'     Bob     7/18/2014    1 '
'     Alice   5/5/2014     3 '
'     Bob     8/10/2014    5 '
------------------------------   
</code></pre>

<p>I want to sum up the 'C' columns for each person per month, so the desired result would be like :</p>

<pre><code>   a             b         c
-----------------------------
'     Alice   5/5/2014     5 '
'     Bob     7/18/2014    1 '
'     Bob     8/10/2014    5 '
------------------------------  
</code></pre>

<p>what is the best way to do this in Panda.</p>

<p>if my question is repeated please re-direct me to other question i couln't find it maybe because i wasn't sure what to look for. thank you</p>

<p>You can use <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.groupby.html" rel="nofollow">groupby</a> function like:</p>

<pre><code>df.groupby(['a', 'b']).sum()
</code></pre>

<blockquote>
  <p>Group series using mapper (dict or key function, apply given function to group, return result as series) or by a series of columns.</p>
</blockquote>

python pandas