Closed merrittkowaleski closed 9 months ago
Hey. We're deprecating this behavior and in the next release we'll have a configuration that will allow you to get the id as a column in the output, i.e. adding the following:
import neuralforecast
neuralforecast.config.id_as_index = False
will return the id as a column from the predict, predict_insample and cross_validation methods.
I'm closing this since it has already been addressed.
What happened + What you expected to happen
We expect the unique_id column in the dataframe returned by predict() to behave as a normal column, since that's what it is in input. However, it's being output as an index.
It can be worked around by running reset_index() on the dataframe returned by predict, but it is unintuitive that that needs to be done.
Versions / Dependencies
neuralforecast==1.6.4
Reproduction script
Expected result:
set(got.columns) == {'unique_id', 'ds', 'NBEATS'}
Actual result:
set(got.columns) == {'ds', 'NBEATS'}
Issue Severity
Low: It annoys or frustrates me.