i have a pandas dataset
A
0 a
1 c
2 b
3 b
4 a
5 c
6 b
and want to get the count at each step, the output should be this:
A Output
0 a 1
1 c 1
2 b 1
3 b 2
4 a 2
5 c 2
6 b 3
i tried using groupby count formula but its not giving me the right output