title: Pandas dataframe. Group by value and count
body: <p>I have the following table:</p>
  
  <pre><code>Days, Age,  Sex
  
  5,    39,   F
  4,    54,   M
  4,    26,   M
  5,    42,   M
  4,    29,   M
  </code></pre>
  
  <p>I want to count number of rows with F and M separately. The following command works, but I'm not OK with the representation:</p>
  
  <pre><code>df.groupby("Sex").count()
  </code></pre>
  
  <p>What will be the best way to do it? Thank you.</p>