title: cumulative number of unique elements for pandas dataframe
body: <p>i have a pandas data frame </p>
  
  <pre><code>id tag
  1  A
  1  A
  1  B
  1  C
  1  A
  2  B
  2  C  
  2  B 
  </code></pre>
  
  <p>I want to add a column which computes the cumulative number of unique tags over at id level. More specifically, I would like to have </p>
  
  <pre><code>id tag count
  1  A   1
  1  A   1
  1  B   2
  1  C   3
  1  A   3
  2  B   1
  2  C   2
  2  B   2
  </code></pre>
  
  <p>For a given id, count will be non-decreasing. Thanks for your help! </p>