I would like to linearly interpolate a single column based on previous and next know values only where data is equal to "---".
Data example:
0
---
---
---
10
---
20
22
15
---
---
---
-15
Wanted output:
0
2.5
5
7.5
10
15
20
22
15
7.5
0
-7.5
-15
I have seen codes that can interpolate based on first column such as date, as described here. And other codes that would do it for step size, like here but they won't work for me. Thank you in advance!