what I am trying to do is group values of 0 in a certain period of time using a python dataframe for example I have:
| Time (seconds) | Value |
| 1 | 0 |
| 2 | 0 |
| 3 | 0 |
| 4 | 1 |
| 5 | 0 |
| 6 | 1 |
| 7 | 1 |
| 8 | 0 |
| 9 | 0 |
| 10 | 0 |
| 11 | 1 |
| 12 | 0 |
| 13 | 0 |
And the output what I'm expecting is:
| Time (seconds) | Value | Group |
| 1 | 0 | 1 |
| 2 | 0 | 1 |
| 3 | 0 | 1 |
| 4 | 1 | |
| 5 | 0 | 2 |
| 6 | 1 | |
| 7 | 1 | |
| 8 | 0 | 3 |
| 9 | 0 | 3 |
| 10 | 0 | 3 |
| 11 | 1 | |
| 12 | 0 | 4 |
| 13 | 0 | 4 |