-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DatetimeProperties.to_pydatetime is deprecated #4363
Comments
Same happens here! |
It's a pandas issue. To remove the warning try downgrading to 2.0.3 instead of using the new 2.1.0 |
After upgrading to the latest Pandas, I'm now seeing this See the deprecation note at the top here: https://pandas.pydata.org/docs/dev/reference/api/pandas.Series.dt.to_pydatetime.html It's unfortunate that the recommended approach for restoring the functionality of returning an numpy array is just to wrap the result in |
hey @alexcjohnson how thorny do you think this one is? is there a simple change to a different way of producing numpy arrays that could be swapped over? if so I could be up for submitting a PR. |
Hmph yeah frustrating that their recommendation does not silence the warning. We could do the same thing Pandas does in their own code and filter the warning out while wrapping in |
The first of those options feels like the best one to me. By using the Here's a proof of concept for |
Thanks @ned2 - let's go with that. Your POC looks great (but |
great thanks @alexcjohnson. have raised a PR over at #4379. there were a few failing tests but they seemed unrelated, so we can see what happens in CI. (ah yes oops, copying error from when I moved the change from the monkey-patched installed plotly package I validated it on.) |
Plotly relies on behavior that Pandas is deprecating. See plotly/plotly.py#4363 and plotly/plotly.py#4379. The fix (plotly/plotly.py#4379) merged into [main and was released in 5.18.0](plotly/plotly.py@57e4d1d).
Plotly relies on behavior that Pandas is deprecating. See plotly/plotly.py#4363 and plotly/plotly.py#4379. The fix (plotly/plotly.py#4379) merged into [main and was released in 5.18.0](plotly/plotly.py@57e4d1d).
Plotly relies on behavior that Pandas is deprecated. See plotly/plotly.py#4363 and plotly/plotly.py#4379. The fix (plotly/plotly.py#4379) merged into [main and was released in 5.18.0](plotly/plotly.py@57e4d1d).
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/_plotly_utils/basevalidators.py:105: 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 resultThe text was updated successfully, but these errors were encountered: