I have a data frame with a date column like the following:
| Decade |
|---|
| 1770-1779 |
| 1780-1789 |
| 1770-1779 |
| 1820-1829 |
| 1770-1779 |
| 1790-1799 |
| 1800-1809 |
| 1810-1819 |
etc...
The desired output is to add a continous variable "Time" like this:
| Decade | Time |
|---|---|
| 1770-1779 | 1 |
| 1780-1789 | 2 |
| 1770-1779 | 1 |
| 1820-1829 | 6 |
| 1770-1779 | 1 |
| 1790-1799 | 3 |
| 1800-1809 | 4 |
| 1810-1819 | 5 |
etc...
Thank you very much.