I have a data frame as the one generated by the script below - bringing in dataframe "data".
Ideally I would like to generate a new dataframe that combines the id and a sequence of 1 : value.
d = {'id': ['a', 'b','c'], 'value': [1, 2,1]}
data = pd.DataFrame(data=d)
data
This means that the ideal output would be:
|------|---------|
| ID | value |
|------|---------|
| a | 1 |
| b | 1 |
| b | 2 |
| c | 1 |
|------|---------|