title: How to get minimum number of occurrences of value in pandas groupby
body: <pre><code>          home_team_name  home_team_goal_count
  0         Bayern München                     2
  1         Bayern München                     2
  2         Bayern München                     1
  3                   Köln                     2
  4                   Köln                     2
  </code></pre>
  <p>I groupby the data on the variable home_team_name.</p>
  <pre><code>df.groupby(&quot;home_team_name&quot;)
  </code></pre>
  <p>The values of <code>home_team_goal_count</code> can only be 2 or 1. I want to get the minimum number of occurrences
  of the values in each group. The result I would want is 1 for Bayern Munchen and 0 for Koln. To illustrate Bayern Munchen has 2 times 2 and 1 times 1, therefore the minimum is 1. Koln has 2 times 2 and 0 time 1 therefore the minimum is 0.</p>