title: Get statistics for each group (such as count, mean, etc) using pandas GroupBy?
body: <p>I have a data frame <code>df</code> and I use several columns from it to <code>groupby</code>:</p>
  
  <pre><code>df['col1','col2','col3','col4'].groupby(['col1','col2']).mean()
  </code></pre>
  
  <p>In the above way I almost get the table (data frame) that I need. What is missing is an additional column that contains number of rows in each group. In other words, I have mean but I also would like to know how many number were used to get these means. For example in the first group there are 8 values and in the second one 10 and so on.</p>
  
  <p>In short: How do I get <strong>group-wise</strong> statistics for a dataframe?</p>