Given the following example:
import pandas as pd
data = pd.DataFrame({'ID' : [1, 1, 2, 4, 4, 4, 4, 4, 11, 11, 16, 17, 17, 19]})
>>> data
ID
0 1
1 1
2 2
3 4
4 4
5 4
6 4
7 4
8 11
9 11
10 16
11 17
12 17
13 19
How can I simply renumber thet values as a column in a dataframe so that they are sequential, i.e. the output of data is:
>>> data
ID
0 1
1 1
2 2
3 3
4 3
5 3
6 3
7 3
8 4
9 4
10 5
11 6
12 6
13 7
Thanks