I have a pandas dataframe, like this:

| ID | date | status |
| --- | --- | --- |
| 10 | 2022-01-01 | 0 |
| 10 | 2022-01-02 | 0 |
| 10 | 2022-01-03 | 1 |
| 10 | 2022-01-04 | 1 |
| 10 | 2022-01-05 | 1 |
| 23 | 2022-02-02 | 0 |
| 23 | 2022-02-03 | 0 |
| 23 | 2022-02-04 | 1 |
| 23 | 2022-02-05 | 1 |
| 23 | 2022-02-06 | 1 |

I would like to group per ID and the first date on status is equal 1.

Expected output:

| ID | date | status | first\_status |
| --- | --- | --- | --- |
| 10 | 2022-01-03 | 1 | 2022-01-03 |
| 23 | 2022-02-03 | 1 | 2022-02-03 |

afteer this I will merge this new DF with previous DF. Final DF:

| ID | date | status | first\_status |
| --- | --- | --- | --- |
| 10 | 2022-01-01 | 0 | 2022-01-03 |
| 10 | 2022-01-02 | 0 | 2022-01-03 |
| 10 | 2022-01-03 | 1 | 2022-01-03 |
| 10 | 2022-01-04 | 1 | 2022-01-03 |
| 10 | 2022-01-05 | 1 | 2022-01-03 |
| 23 | 2022-02-02 | 0 | 2022-02-04 |
| 23 | 2022-02-03 | 0 | 2022-02-04 |
| 23 | 2022-02-04 | 1 | 2022-02-04 |
| 23 | 2022-02-05 | 1 | 2022-02-04 |
| 23 | 2022-02-06 | 1 | 2022-02-04 |

I tried many ways to do this, but unsuccessful