Nixtla / mlforecast

Scalable machine 🤖 learning for time series forecasting.
https://nixtlaverse.nixtla.io/mlforecast
Apache License 2.0
841 stars 80 forks source link

error in StatsForecast.plot #231

Closed maironchaves closed 11 months ago

maironchaves commented 11 months ago

Description

hey guys

I identified a small bug in StatsForecast.plot(). The ID of the SKUs of the company I work for has zeros on the left, for example "00056497", and for some reason, when I execute a command like

from statsforecast import StatsForecast as sf

sf.plot(df_sales, plot_random=True)

sf.plot() changes the original data frame, if I look at the same sku, now it will look like this "56497", without the leading zeros.

Use case

No response

jmoralez commented 11 months ago

Hey @maironchaves. Can you try using utilsforecast.plotting.plot_series instead and let us know if it has the same problem?

maironchaves commented 11 months ago

It worked perfectly, the leading zeros were preserved. Thank you very much @jmoralez