I have a dataframe that looks like this:
Step | Text | Parameter |
---|---|---|
15 | 1 | |
16 | control | 2 |
17 | printout | 3 |
18 | print2 | 1 |
19 | Nan | 2 |
20 | Nan | 3 |
21 | Nan | 4 |
22 | Nan | 1 |
23 | Nan | 2 |
24 | Nan | 1 |
And I want my dataframe to look like this:
Step | Text | Parameter |
---|---|---|
15 | 1 | |
15 | 2 | |
15 | 3 | |
16 | control | 1 |
16 | control | 2 |
17 | control | 3 |
17 | control | 4 |
18 | printout | 1 |
18 | printout | 2 |
19 | print2 | 1 |
So basically when I have "1" in Parameter column, I need the next value from Step and Text. Any ideas?:)