Answers for "how to see how manz duplicate values in a column pandas"

2

count how many duplicates python pandas

df.duplicated(subset='one', keep='first').sum()
Posted by: Guest on December-02-2020
0

python - count number of values without dupicalte in a second column values

ID, domain
123, 'vk.com'
123, 'vk.com'
123, 'twitter.com'
456, 'vk.com'
456, 'facebook.com'
456, 'vk.com'
456, 'google.com'
789, 'twitter.com'
789, 'vk.com'

df = df.groupby('domain')['ID'].nunique()
print (df)

domain
'facebook.com'    1
'google.com'      1
'twitter.com'     2
'vk.com'          3
Posted by: Guest on October-23-2020

Code answers related to "how to see how manz duplicate values in a column pandas"

Python Answers by Framework

Browse Popular Code Answers by Language