I have a df as below. There are values for the speed with an indeterminate amount of nan values between the two values. I am trying to replace the nan values with the mean between the two numeric values.
timestamp ... Speed km h^-1
0 1434838676097.07006835937500000000 ... 53.02799834399999667767
1 1434838676130.07006835937500000000 ... nan
2 1434838676229.07006835937500000000 ... nan
3 1434838676328.07006835937500000000 ... nan
4 1434838676429.07006835937500000000 ... nan
5 1434838676526.07006835937500000000 ... nan
6 1434838676625.07006835937500000000 ... nan
7 1434838676726.07006835937500000000 ... nan
8 1434838676826.07006835937500000000 ... nan
9 1434838676924.07006835937500000000 ... nan
10 1434838676992.07006835937500000000 ... 51.19200097200000243447