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
1Series.value_counts(self, normalize=False, sort=True, ascending=False, bins=None, dropna=True)