There is the code:
x = np.array([2, 2.5, 3, 3.5, 3.75, 4, 4.5, 4.75, 5, 5.25, 5.5, 6])
y = np.array([5.197, 7.78, 11.14, 15.09, np.nan, 19.245, 23.11, np.nan, 26.25, np.nan, 28.6,30.3])
x.shape = (12, 1)
x.shape = (12, 1)
a = pd.DataFrame(x, y)
a.interpolate()
print(a)
And the output is the same, i have no idea what i do wrong.
5.197 2.00
7.780 2.50
11.140 3.00
15.090 3.50
NaN 3.75
19.245 4.00
23.110 4.50
NaN 4.75
26.250 5.00
NaN 5.25
28.600 5.50
30.300 6.00