title: Count of each type of label in a column of a pandas data frame
body: <p>I have a following data frame. I need to find count of each type of MNTPCODE for each donor.</p>
  
  <pre><code>    CONTID  MEDIUMCODE  MNTOPCODE   CLASCODE    EXTRELNO    CONTDIREC   CONTDATE
     000405402     CI        CTS        CT         0000020       O           1994-05-09
      000430904   CI       CTS          CT         0000020        O       1994-06-14
     000592732    CI       CTS          CT        0000020         O       1994-10-21
  </code></pre>