You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It attempts to call v.dt.to_pydatetime() on a Series with any kind of date or time dtype.
This isn't correct, because a date dtype is different than a datetime dtype, see the comment from pandas maintainer @mroeschke on this issue: pandas-dev/pandas#52812. In other words, this is unsupported by pandas, and will continue to raise an error in the future.
You should probably just use v.to_numpy() instead.
Reproducing Code
The following code results in the error AttributeError: 'pyarrow.lib.DataType' object has no attribute 'unit', as a result of the above bug.
@emilykl I think this can be closed now, as per discussion in #4836, if I run this code now with the latest plotly build then the figure displays correctly
The Issue
Consider this branch of code:
plotly.py/packages/python/plotly/_plotly_utils/basevalidators.py
Line 103 in 956ab2c
It attempts to call
v.dt.to_pydatetime()
on a Series with any kind of date or time dtype.This isn't correct, because a
date
dtype is different than adatetime
dtype, see the comment from pandas maintainer @mroeschke on this issue: pandas-dev/pandas#52812. In other words, this is unsupported by pandas, and will continue to raise an error in the future.You should probably just use
v.to_numpy()
instead.Reproducing Code
The following code results in the error
AttributeError: 'pyarrow.lib.DataType' object has no attribute 'unit'
, as a result of the above bug.Note that the following code works, by properly calling
.to_numpy()
and letting pandas figure out how to handle it:The text was updated successfully, but these errors were encountered: