For example, I have the following dataframe:
Date Price
2020-01-01 500
2020-01-02 550
2020-01-03 480
2020-01-04 420
2020-01-05 450
2020-01-06 390
2020-01-07 430
2020-01-08 480
2020-01-09 490
2020-01-10 485
And I want to insert the "Prince2" column in the previous data frame, so that I repeat the line until the next similar date:
Date Price2
2020-01-01 50
2020-01-04 20
2020-01-06 90
2020-01-07 30
2020-01-10 80
Would be like this:
Date Price Price2
2020-01-01 500 50
2020-01-02 550 50
2020-01-03 480 50
2020-01-04 420 20
2020-01-05 450 20
2020-01-06 390 90
2020-01-07 430 30
2020-01-08 480 30
2020-01-09 490 30
2020-01-10 485 80
Can someone help me?