title: Check for a repeating sequence in a pandas dataframe
body: <p>I have a pandas Dataframe, a column of which has a repeating sequence of values which almost looks like the following:</p>
  
  <pre><code>      Cell
  0      x_a
  1      x_b
  2      x_c
  3      x_a
  4      x_b
  5      x_c
  6      x_a
  7      x_b
  8      x_b
  9      x_c
  10     x_c
  11     x_b
  12     x_a
  </code></pre>
  
  <p>I need to check through this entire column to see that the repetition of this sequence "x_a, x_b, x_c" is exactly maintained in this order, i.e. "x_c" follows x_b" follows "x_a".</p>
  
  <p>Wherever this order is broken, e.g. in indices 7 and 8 where "B" is repeated twice or 10, 11, 12 where the order is wrong, I need to be able to find out which value is playing foul?</p>
  
  <p>Any pointers on how to do it?</p>
  
  <p>I've been scratching my head with <code>df.loc</code> all this while but to no avail and I'm fairly certain <code>df.loc</code> is not the right way. </p>
  
  <p>Thanks in advance guys.</p>