for i in range( 1, len( df ) ):
if df.loc[i]["identification"] == df.loc[i-1]["identification"] and df.loc[i]["date"] == df.loc[i-1]["date"]:
df.loc[i,"duplicate"] = 1
else:
df.loc[i,"duplicate"] = 0
This simple for loop runs really slow when processing a dataframe of a big size.
Any suggestions?