title: How to group and count rows by month and year using Pandas?
body: <p>I have a dataset with personal data such as name, height, weight and date of birth. I would build a graph with the number of people born in a particular month and year. I'm using python pandas to accomplish this and my strategy was to try to group by year and month and add using count. But the closest I got is to get the count of people by year or by month but not by both.</p>
  
  <pre><code>df['birthdate'].groupby(df.birthdate.dt.year).agg('count')
  </code></pre>
  
  <p>Other questions in stackoverflow point to a Grouper called TimeGrouper but searching in pandas documentation found nothing. Any idea?</p>