Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (19.9k points)

After some operations I have a series that i got after grouping by phone number and counting different calls. I need to count the phone numbers that have an equal number of calls. I mean, if there is 5 people who made 3 calls I need to get a series or a dataframe looking like:

num_calls 

3    5

1    100

...

My series now looks like

phone_num 

89248089190  5

48048102481  6 

12948148014  2

14091404108  5

1 Answer

0 votes
by (25.1k points)

In this case you can just use .value_counts() method.

Browse Categories

...