title: How to get the index of each increment in pandas series?
body: <p>how to get the index of pandas series when the value incremented by one?</p>
  
  <p>Ex. The input is  </p>
  
  <pre><code>  A
  0 0
  1 1
  2 1
  3 1
  4 2
  5 2
  6 3
  7 4
  8 4
  </code></pre>
  
  <p>the output should be: <code>[0, 1, 4, 6, 7]</code></p>