title: Rank column values according to previous column value in data frame
body: <p>I have a data frame like this</p>
  
  <pre><code>Value  Name
  6   jameel
  8   jameel
  1   sarah
  8   jameel
  1   sarah
  10  jameel
  1   sarah
  10  jameel
  1   sarah
  10  jameel
  2   sarah
  11  jameel
  1   sarah
  12  jameel
  2   sarah
  14  jameel
  3   sarah
  14  jameel
  </code></pre>
  
  <p>I want to covert this data frame so that the first occurrence for sarah is one plus the previous max value of Jameel so according to this data frame the first occurrence for sarah is in the third row which will become 9 as the max previous value for jameel is 8. After this wherever the value of sarah is 1 it should be replaced by 9 and it should not change. Now that when we have done this we can notice jameel's value increases and becomes max at 10 at row 8 as it shouldn't change the subsequent sarah value as it is 1 but instead it should change sarah's value at row 11 to 10+1 = 11 as it is not 1 but 2 and this procedure should follow and the resultant frame should look like this.</p>
  
  <pre><code>Value  Name
  6   jameel
  8   jameel
  9   sarah
  8   jameel
  9   sarah
  10  jameel
  9   sarah
  10  jameel
  9   sarah
  10  jameel
  11  sarah
  11  jameel
  9   sarah
  12  jameel
  11  sarah
  14  jameel
  15  sarah
  14  jameel
  </code></pre>
  
  <p>Notice that the jameel's values and sarah's values individually are always in ascending order</p>
  
  <p>values for jameel :6,8,10,11,12,14</p>
  
  <p>values for sarah :1,2,3</p>
  
  <p>Is there a way to this in pandas or is there any other pythonic way to this?</p>