facebook / facebook/prophet

FutureWarning of DatetimeProperties.to_pydatetime is depircated for plot_plotly and m.plot()

Open
#2,492 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
20.4k
Forks
4.6k
Avg merge
19h 52m
Merged PRs (30d)
1

Description

The m.plot(forecast) or the plot_plotly(m, forecast) functions when executed result in a FutureError the reads as follows

> \Lib\site-packages\prophet\plot.py:71: FutureWarning: The behavior of DatetimeProperties.to_pydatetime is deprecated, in a future version this will return a Series containing python datetime objects instead of an ndarray. To retain the old behavior, call `np.array` on the result
> fcst_t = fcst['ds'].dt.to_pydatetime()

> venv\Lib\site-packages\prophet\plot.py:72: FutureWarning: The behavior of DatetimeProperties.to_pydatetime is deprecated, in a future version this will return a Series containing python datetime objects instead of an ndarray. To retain the old behavior, call `np.array` on the result
> ax.plot(m.history['ds'].dt.to_pydatetime(), m.history['y'], 'k.',

If there is any way to get through this, please help me or please make necessary changes to resolve this error.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.