I would like to create a new variable which indexes the value of another variable. The new column starts from 1 as below. Thanks.
ColumnIHave ColumnIWant
A 1
A 1
A 1
B 2
B 2
B 2
C 3
C 3
C 3