# import necessary libraries
import pandas as pd
import numpy as np
# create sample series
time_series = pd.Series(['2022-01-01', '2022-01-03', '2022-01-04'],
dtype='datetime64[ns]')
values = pd.Series([10, 20, 30])
# create a index with all dates b/w the
# first and last dates in the series
index = pd.date_range(start = time_series.min(),
end = time_series.max(), freq='D')
# use NumPy's interp function to fill missing values
interp_values = np.interp(index, time_series, values)
# create a dataframe with the interpolated values
# and the new index
df = pd.DataFrame({'value': interp_values}, index = index)
# print the results
print(df)