title: How to slice a pandas dataframe by rows between two column values?
body: <pre><code>     A          B    C  D      E    
  0  1.0 2013-01-02  1.0  1   test  
  1  1.0 2014-01-02  1.0  2    car  
  2  1.0 2015-01-02  1.0  3 tested  
  3  1.0 2016-01-02  1.0  4  train 
  </code></pre>
  
  <p>How do I slice a pandas dataframe to contain three consecutive rows out of the above based on the values in column E, e.g. from 'test' to 'tested'?</p>