title: nth occurrence of a value
body: <pre><code>    user_login  login_type  login_time
  0   a   0   14:00:00
  1   b   0   08:20:03
  2   c   1   09:10:03
  3   b   1   10:49:03
  4   a   1   11:19:03
  5   a   1   12:29:03
  6   c   0   13:39:03
  7   c   1   14:49:03
  </code></pre>
  
  <p>I have this <code>df1</code>, i want to find the 2nd occurences of <code>user_login</code> and if the corresponding value in <code>login_type</code> is 1, then put the <code>login_time</code> in a new column.
  The final result would look like this:</p>
  
  <pre><code>user_login  login_type  login_time  2nd_login_time
  a               0        14:00:00   No 2nd login_time
  b               0         8:20:03   No 2nd login_time
  c               1         9:10:03   No 2nd login_time
  b               1        10:49:03   10:49:03
  a               1        11:19:03   11:19:03
  a               1        12:29:03   No 2nd login_time
  c               0        13:39:03   13:39:03
  c               1        14:49:03   No 2nd login_time
  </code></pre>
  
  <p>Any ideas how to achieve this in pandas?</p>