df['match'] = df.col1.eq(df.col1.shift()) print (df) col1 match 0 1 False 1 3 False 2 3 True 3 1 False 4 2 False 5 3 False 6 2 False 7 2 True