delete the entire row while remove duplicates with python

57

python: remove duplicate in a specific column -

df = df.drop_duplicates(subset=['Column1', 'Column2'], keep='first')

delete the entire row while remove duplicates with python' -

result_df = df.drop_duplicates(subset=['Column1', 'Column2'], keep='first')
print(result_df)

Comments

Submit
0 Comments