0

I have the following df

0       SOD05
1         NaN
2         NaN
3       SOD06
4         NaN
5         NaN
6         NaN
7         NaN
8       SOD07

I would like to fill the NaN based on the value above and when a new value is there, I want to use that value. How to do that? Please help

Desired output:

0       SOD05
1       SOD05
2       SOD05
3       SOD06
4       SOD06
5       SOD06
6       SOD06
7       SOD06
8       SOD07
Max
  • 467
  • 1
  • 8

0 Answers0