how to drop duplicate rows in pandas based on two column code example
Example 1: remove duplicates based on two columns in dataframe
df.drop_duplicates(['A','B'],keep= 'last')
Example 2: remove duplicate row in df
df = df.drop_duplicates()
df.drop_duplicates(['A','B'],keep= 'last')
df = df.drop_duplicates()