0

I have an excel file and I would like to make a script with pandas to group all similar numbers in column 2 and just count how many times each number occurs in column 2. For example, if the information in my excel file looks like this:

A     B
124   3
112   3
104   3
122   3
345   2
444   2
221   1

I want it to come out something like this:

A     B
4     3
2     2
1     1

I have tried some things in pandas but nothing is working. Any help would be appreciated.

Camol
  • 53
  • 8

0 Answers0