Time Series Imputation
**Problem:** You are given a time series dataset with missing values. Your task is to impute the missing values using a suitable algorithm.
**Example:** Suppose we have a dataset with 365 days of historical data, and 10 days have missing values. We want to impute the missing values using a suitable algorithm.
**Constraints:** You should use a suitable algorithm (e.g., mean, median, linear interpolation) to impute the missing values.
Test Cases
Test Case 1
Input:
[[1,2,np.nan,4,5,6,7,8,9,10,11,12], [13,14,15,np.nan,17,18,19,20,21,22,23,24]]Expected:
[[1,2,3.0,4,5,6,7,8,9,10,11,12],[13,14,15,16.0,17,18,19,20,21,22,23,24]]Test Case 2
Input:
[[1,2,3,4,5,6,7,8,9,10,11,12], [13,14,15,16,17,18,19,20,21,22,23,24]]Expected:
[[1,2,3,4,5,6,7,8,9,10,11,12],[13,14,15,16,17,18,19,20,21,22,23,24]]+ 3 hidden test cases