Skip to content Skip to sidebar Skip to footer

Check For Duplicates In A Python Panda Data Structure

I have a csv file. It looks something like this; name,id, AAA,1111, BBB,2222, CCC,3333, DDD,2222, I would like to extract the data in id column and placed inside a data structure.

Solution 1:

To find out whether there are duplicate IDs in that whole column, do

df['id'].duplicated().any()

Post a Comment for "Check For Duplicates In A Python Panda Data Structure"