Hackerss.com

Hackerss.com is a community of amazing hackers

Hackerss is a community for developers, data scientitst, ethical hackers, hardware enthusiasts or any person that want to learn / share their knowledge of any aspect of digital technology.

Create account Log in
hackerss
hackerss

Posted on

Python Remove duplicates of a dataframe


import pandas as pd

df = pd.DataFrame({'a': [1, 1, 2, 2, 3, 3, 4, 4],
                   'b': [1, 1, 2, 2, 3, 3, 4, 4],
                   'c': [1, 1, 2, 2, 3, 3, 4, 4]})

df = df.drop_duplicates()

print(df)
Enter fullscreen mode Exit fullscreen mode

Top comments (0)