Discussions

Ask a Question
Back to All

Index and columns

Hello!

I am running into a closed loop of errors.

If I keep "ds", "unique_id" and "y" as columns, i get this error: KeyError: "['unique_id', 'ds'] not in index".

If I make "ds" and "unique_id" as index, i get this error: KeyError: 'ds'.

This is my code for using nixtla:

timegpt_df2 = nixtla_client.forecast(
df=train,
h=horizon,
time_col='ds',
target_col='y',
X_df=train[features],
)

How could I solve this?

Thank you,

Alexa