Hello I have this Dataframe:
SerialNr | Amount |
---|---|
1 | 2 |
2 | 4 |
3 | 3 |
4 | 2 |
And I want a table that shows me how many serial numbers in the right column have the same numbers. Here for example it would look like this
Amount | Quantity of SerialNr |
---|---|
1 | 0 |
2 | 2 |
3 | 1 |
4 | 1 |
It should sum up the Serialnummer with the same amount
Tried to do it with groupby but did not work