In the following example of a data frame:
| Date | ID number |
|---|---|
| 15/06/2022 | 1523 |
| 15/06/2022 | 1402 |
I'm trying to add a column in pandas to a the data frame that has repetitive values, such as:
| Date | ID number | Hour |
|---|---|---|
| 15/06/2022 | 1523 | 1 |
| 15/06/2022 | 1523 | 2 |
| 15/06/2022 | 1523 | 4 |
| 15/06/2022 | 1523 | 5 |
| 15/06/2022 | 1523 | 6 |
| 15/06/2022 | 1523 | 7 |
| 15/06/2022 | 1523 | 8 |
| 15/06/2022 | 1402 | 1 |
| 15/06/2022 | 1402 | 2 |
| 15/06/2022 | 1402 | 4 |
| 15/06/2022 | 1402 | 5 |
| 15/06/2022 | 1402 | 6 |
| 15/06/2022 | 1402 | 7 |
| 15/06/2022 | 1402 | 8 |
How is this possible please? Thanks in advance