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