I have a dataframe lik below
| ID | name | number |
|---|---|---|
| 1 | Sta | 2 |
| 1 | Danny | 5 |
| 1 | Sta | 2 |
| 1 | elle | 4 |
| 1 | Sta | 2 |
| 1 | jake | 9 |
| 1 | Andy | 11 |
| 1 | Adam | 22 |
| 1 | blah | 44 |
| 1 | blahblah | 66 |
I want to extract the records till the last occurrence of Sta. like this below
| ID | name | number |
|---|---|---|
| 1 | Sta | 2 |
| 1 | Danny | 5 |
| 1 | Sta | 2 |
| 1 | elle | 4 |
| 1 | Sta | 2 |
I am not sure how I can do that. Can someone please suggest?