title: For any index return the minimum of the previous two index
body: <pre><code>population = pd.DataFrame({'village': pd.Series([15,4,1,2], index=['boys','girls','men','women']),
      'town': pd.Series([20,36,26,28], index=['boys','girls', 'men', 'women'])})
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>----  town    village
  boys    20      15
  girls   36      4
  men     26      1
  women   28      2
  </code></pre>
  
  <p>For any index in the dataframe above, I want that particular index value to be the minimum value between the previous two index values.</p>
  
  <p>For example I expect the the value for men in town to be 20 since it is the smaller value between (36,20)</p>
  
  <p>I tried implementing it using <code>df.shift(2).cummin(axis=0)</code> but that didn't work.</p>
  
  <p>Expected_output:</p>
  
  <pre><code>----  town    village
  boys    NaN     NaN
  girls   NaN     NaN
  men     20      4
  women   26      1
  </code></pre>