1#TO count repetition of each unique values(to find How many times the same-
2# unique value is appearing in the data)
3
4item_counts = df["Your_Column"].value_counts()
5#Returns Dictionary => {"Value_name" : number_of_appearences}
1df = df.groupby('domain')['ID'].nunique()
2
3print (df)
4domain
5'facebook.com' 1
6'google.com' 1
7'twitter.com' 2
8'vk.com' 3
9Name: ID, dtype: int64
1pd.value_counts(df.Account_Type)
2
3Gold 3
4Platinum 1
5Name: Account_Type, dtype: int64
1df.groupby('mID').agg(['count', 'size', 'nunique']).stack()
2
3
4 dID hID uID
5mID
6A count 5 5 5
7 size 5 5 5
8 nunique 3 5 5
9B count 2 2 2
10 size 2 2 2
11 nunique 2 2 2
12C count 1 1 1
13 size 1 1 1
14 nunique 1 1 1