I have a df column that looks like this:
**Price**
1000
NaN
NaN
NaN
1500
NaN
I want to fill the NaN's with previous value plus add to it 100. So it would look like this:
**Price**
1000
1100
1200
1300
1500
1600
I've tried this:
df['Price'] = df['Price'].fillna(df['Price'].ffill()+100)
And it works if there is only one missing value in between price values. I would like to have something that works with multiple missing values in between values that are present, also in case the first value in column is NaN I would like it to be filled by the result of deducting 100 from the next value. Thanks for your help, appreciate it.