LoginID1 CallDisposition
0 58130 Connected
1 58130 Connected
2 58130 Connected
3 58130 Connected
4 58130 Connected
... ... ...
9248 56694 NotConnected
9249 56694 NotConnected
9250 56694 NotConnected
9251 56694 NotConnected
9252 56694 NotConnected
there are many login IDs (column LoginID1) I want to know values of only four, like [58130:58134] counting Connected and NotConnected in CallDisposition (column).
I have tried
df.groupby('LoginID1')['CallDisposition'].value_counts()
however it returns all the values of all the login IDs.
LoginID1 CallDisposition
1098 NotConnected 6
Connected 5
1172 Connected 3
3052 Connected 1
4288 NotConnected 26
..
58207 NotConnected 6
Connected 3
58289 NotConnected 71
Connected 18
47483750 NotConnected 1