I have a data frame with a column having various letters ordered.
I want to create a column that counts increasingly the number of times a letter is repeated at each new row:
Letters Counter
A 1
A 2
A 3
B 1
C 1
C 2
D 1
D 2
D 3
D 4
Is there a way to avoid a loop?