title: Create a column which increments value for changes in another row
body: <p>I have a dataframe with two columns as below:</p>
  
  <pre><code>Var1Var2
  a   28
  b   28
  d   28
  f   29
  f   29
  e   30
  b   30
  m   30
  l   30
  u   31
  t   31
  t   31
  </code></pre>
  
  <p>I'd like to create a third column with values which increases by one for every change in value of another column.</p>
  
  <pre><code>Var1Var2Var3
  a   28  1
  b   28  1
  d   28  1
  f   29  2
  f   29  2
  e   30  3
  b   30  3
  m   30  3
  l   30  3
  u   31  4
  t   31  4
  t   31  4
  </code></pre>
  
  <p>How would I go about doing this?</p>