How to perform linear interpolation?

There is a water meter, and the collector records the reading every hour. The data is as follows:

捕获1

It can be seen that there is missing data at 14:00, 15:00, 16:00, and 17:00 in the afternoon. How to linearly interpolate the missing data?

You can use time_bucket_gapfill combined with interpolate. Check a full article about it: