I have a df

```
index  id  action
 1     A    crawl
 2     A    walk
 3     A    run
 4     B   crawl
 5     B    run
 6     B    walk
 7     B    jump
 8     B    walk

```

I want to delete a certain row with text `walk` only if the previous row is `run`.

Resulting df:

```
   index  id  action
     1     A    crawl
     2     A    walk
     3     A    run
     4     B   crawl
     5     B    run
     7     B    jump
     8     B    walk

```