I have a pandas dataframe df
that looks like:
HOUR VALUE
0 1 2
1 2 4
2 3 6
3 4 None
4 5 None
5 6 None
when I do df.interpolate(axis=0)
, it returns:
HOUR VALUE
0 1 2
1 2 4
2 3 6
3 4 6
4 5 6
5 6 6
Is there something I can do to return:
HOUR VALUE
0 1 2
1 2 4
2 3 6
3 4 8
4 5 10
5 6 12
? I am using dummy numbers in this example, but with my real numbers, I just want to get roughly numbers that follow a linear trend, is there something that will generate numbers that follow a linear trend, and I can maybe specify things like standard dev?