arundo/adtk

runtime error

Opened this issue · 2 comments

When running ClassicalDecomposition on the time series data (10 seconds interval), there is an error:

RuntimeError: Series does not follow any known frequency (e.g. second, minute, hour, day, week, month, year, etc.

The time series data has DateTime index.

How to solve the error?

Regards

If your time series data following an exact 10 seconds spacing, ADTK should be able to identify it without a problem because it uses inferred_freq in Pandas. Could you check the value of your_series.index.inferred_freq?

@kusumy try to change frequency by changing resample function

i.e df=df.set_index('Date').resample("10min").mean() ## resample to 10 min for example
df=df.dropna() ###Drop Nan rows
print(df.index.inferred_freq)

check the print if pandas is detecting the sample you given or it will give none and try to resample again..