I'm trying to remove rows in a pandas dataframe, in a way that everything between two specific values (e.g., start and end) is deleted, including the two values. These values can repeat, as in:
| c1 | c2 |
|---|---|
| 1 | 1 |
| 2 | start |
| 3 | 1 |
| 4 | 0 |
| 5 | end |
| 6 | 1 |
| 7 | start |
| 8 | 1 |
| 9 | 0 |
| 10 | end |
| 11 | 1 |
So the desired output would be:
| c1 | c2 |
|---|---|
| 1 | 1 |
| 6 | 1 |
| 11 | 1 |