title: how to detect value changed in python, pandas in each object
body: <blockquote>
    <p>180762508,1268510763,374723980,293,20180402035748,198,25,1,1
    180762508,1268503685,374717256,307,20180402035758,225,38,1,1
    180762508,1268492506,374708540,236,20180402035808,222,52,1,1
    180762508,1268485868,374697563,248,20180402035818,197,47,1,1
    180762508,1268482430,374688520,272,20180402035828,196,31,1,1
    180707764,1270608366,374988433,246,20180402035925,66,37,1,0
    180707764,1270620899,374992366,222,20180402035935,68,49,1,0</p>
  </blockquote>
  
  <p>first column is unique id and the last column is my interest
  I wanna know how can I find last column is changed from 0 to 1
  I made a really big data frame with this dataset in pandas</p>
  
  <pre><code>import glob
  
  import pandas as pd
  
  path = r"1\1"
  
  allFiles = glob.glob(path+"\*.DAT")
  
  list=[]
  
  for filename in allFiles:
  
      df = pd.read_csv(filename, header = None)
  
      list.append(df)
  
  a = pd.concat(list)
  
  a.head()
  </code></pre>
  
  <p>this is all I did </p>
  
  <p>I don't have error but I wanna know the algorithm that I can find the last columns' value changed in each unique id
  my goal is made a data frame that 
  first column is unique id and second, third column is latitude, longitude which is in third, second columns in my dataset and the time stamp which is in 5th columns that last column's value is changed from 0 to 1</p>