plot error: Multi-dimensional indexing (e.g. obj[:, None]) is no longer supported
- Dominant language
- Python
- Stars
- 20.4k
- Forks
- 4.6k
- Avg merge
- 19h 52m
- Merged PRs (30d)
- 1
Description
Hi, I have predicted dataframe (called forecast) using Prophet time series model with the following 4 columns
`ds | yhat | yhat_lower | yhat_upper`
`2023-01-28 | 144.54255 | 130.96604 | 157.49898`
I am trying to plot the dataframe with the following command
`fig1 = model.plot(forecast)`
This doesn't work anymore and throws the error Multi-dimensional indexing (e.g. obj[:, None]) is no longer supported. Convert to a numpy array before indexing instead.
I converted my dataframe to numpy array
`forecast_np =forecast[['ds', 'yhat', 'yhat_lower', 'yhat_upper']].to_numpy()`
but still get the error
`IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices`
Can you please help here?
Thanks
Contributor guide
Assessment
This issue has not been assessed yet.