title: pandas listing same indexes
body: <p>if a table has the same index 3 times in a row, I want it to fetch me this dataframe.</p>
  <p>example</p>
  <pre><code>index  var1
  1        a     
  2        b    
  2        c
  2        d
  3        e
  2        f
  5        g
  2        f
  </code></pre>
  <p>After the code</p>
  <p>expected output</p>
  <pre><code>index  var1
  2       b
  2       c
  2       d
  </code></pre>