title: Add new column with each row as previous group value from another column
body: <p>I have a dataframe:</p>
  <pre class="lang-python prettyprint-override"><code>data = pd.DataFrame({'start':['2020-08-01','2020-08-02','2020-08-03','2020-08-04','2020-08-05','2020-08-06','2020-08-07','2020-08-08'],
                       'end':['2020-08-03','2020-08-03','2020-08-06','2020-08-06','2020-08-06','2020-08-07','2020-08-08','2020-08-08'],
                       'score':[74, 81, 38, 49, 79, 17, 53, 69]})
  </code></pre>
  <p>that I need to add a new column in which each row is the <code>end</code> date from its previous group. The desired dataframe is:</p>
  <pre class="lang-python prettyprint-override"><code>         start         end    prev_end  score
  0   2020-08-01  2020-08-03         NaN     74
  1   2020-08-02  2020-08-03         NaN     81
  2   2020-08-03  2020-08-06  2020-08-03     38
  3   2020-08-04  2020-08-06  2020-08-03     49
  4   2020-08-05  2020-08-06  2020-08-03     79
  5   2020-08-06  2020-08-07  2020-08-06     17
  6   2020-08-07  2020-08-08  2020-08-07     53
  7   2020-08-08  2020-08-08  2020-08-07     69
  </code></pre>
  <p>so that I can mark the rows where <code>start</code> is greater than the <code>prev_end</code> date as below:</p>
  <pre class="lang-python prettyprint-override"><code>         start         end    prev_end  mark  score
  0   2020-08-01  2020-08-03         NaN     0     74
  1   2020-08-02  2020-08-03         NaN     0     81
  2   2020-08-03  2020-08-06  2020-08-03     0     38
  3   2020-08-04  2020-08-06  2020-08-03     1     49
  4   2020-08-05  2020-08-06  2020-08-03     1     79
  5   2020-08-06  2020-08-07  2020-08-06     0     17
  6   2020-08-07  2020-08-08  2020-08-07     0     53
  7   2020-08-08  2020-08-08  2020-08-07     1     69
  </code></pre>
  <p>Is there an easy solution to do this? Or some direct way without having to create <code>prev_end</code>? Many thanks!</p>