Pandas > Check duplicates

Name
Code
Output
dataframe = pandas.DataFrame(numpy.random.randint(0,10,size=(5, 2)), columns=['C1','C2'])
print ("dataframe")
print (dataframe)
# alternatively duplicates = dataframe.C1.duplicated()
duplicates = dataframe.duplicated('C1')
print ("duplicates")
print (duplicates)
dataframe
   C1  C2
0   9   1
1   2   2
2   6   1
3   9   7
4   0   7
duplicates
0    False
1    False
2    False
3     True
4    False
dtype: bool