python - count number of occurence in a column
print df
col1 education
0 a 9th
1 b 9th
2 c 8th
len(df[df['education'] == '9th'])
python - count number of occurence in a column
print df
col1 education
0 a 9th
1 b 9th
2 c 8th
len(df[df['education'] == '9th'])
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
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us