If the date in a column starts to be incremental, then assign that date to a new column in pandas. Below is how my dataframe looks like.
The column MeasureDate_day has the date incremental from line 3 till line 5. For this type of instance I want the date 2022-12-03 (from line 3) to be assigned into a new column against line 5. For every two instances if the date is incremental, the third row should be assigned the first instance of the incremental date in a new column.
I'm confused how to do it.
Below is what i'm expecting as output
I have tried using groupby, value_counts, apply lambda etc, but nothing gave me the result that I'm looking for.