I am working with a dataset containing serial numbers. I would like to add a column that defines if it is the first, second or nth time that the serial number occurs. For example:
serial occurrence
110 1
111 1
112 1
110 2
110 3