title: How to compare if two consecutive fields are same in the data frame?
body: <p>I have a <code>dataframe</code> in which first column is :</p>
  
  <pre><code>id = ["6LDFTLL9", "6LDFTLL9", "7SKDEZWE", "7SKDEZWE", "7SKDEZWE", "7SKDEZWE","6VPZ4T5P", "EHYXE34N", "EHYXE34N", "TT56GTN2","TT56GTN2" ]
  </code></pre>
  
  <p>I want to check if the consecutive id are same or not. I tried with the following code but it didn't work.</p>
  
  <pre><code>i=1
  for index, row in df.iterrows():
       df.id.iloc[i] == df.id.iloc[i + 1]:
       i = i+1
  </code></pre>