Discussions

Ask a Question
Back to All

Question about fill_gaps() function

Hi all,

I'm following the'Missing values' tutorial, applying it to my data set.

After to have loaded the data and built a DataFrame compatible with TimeGPT, I discovered that the timestamp 'ts' column had 'some holes'. So I recalled the fill_gaps() function as:



print('Number of rows before filling gaps:', len(df_timeGpt))
df_complete = fill_gaps(df_timeGpt, freq='min', time_col='ts')
print('Number of rows after filling gaps:', len(df_complete))

Here I have the df_complete DataFrame that correctly contains 'ts' without holes and in the correct time range, the column 'unique_id' is correct (set of 5 unique values) but the 'y' column is empty. So I cannot apply the next step (see the tutorial) to have interpolated values on target column - they are empty!

What's the problem, please ??