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
{{ message }}
Repository navigation
Series / DataFrame view method not implemented. #8439
When attempting to convert a column from one dtype to another using astype, there is a FutureWarning raised by Dask and Pandas regarding the move to using view.
Pandas suggests replacing the astype method with view, however view appears not to be implemented in dask.dataframe.core.
This is the FutureWarning from Pandas:
FutureWarning: casting datetime64[ns] values to int64 with .astype(...) is deprecated and will raise in a future version. Use .view(...) instead.
df['TIMESTAMP_astype'] = df['TIMESTAMP'].astype('int64')
Thanks for raising this @ocqco . It looks like this deprecation was added in pandas 1.3.0. I also see some heartache downstream related to this in holoviews: holoviz/holoviews#5146.
I don't think it would be hugely difficult to add a view method to dask.dataframe.
Reacted by Pavithra Eswaramoorthy, James A. Bednar and ocqco
Activity
[-]DataFrame view method not implemented.[/-][+]Series / DataFrame view method not implemented.[/+]ian-r-rose commentedon Dec 1, 2021
Thanks for raising this @ocqco . It looks like this deprecation was added in pandas 1.3.0. I also see some heartache downstream related to this in holoviews: holoviz/holoviews#5146.
I don't think it would be hugely difficult to add a
viewmethod to dask.dataframe.jorisvandenbossche commentedon Jan 18, 2022
Small note that we are undoing this deprecation, see pandas-dev/pandas#45449 (pandas-dev/pandas#45034).
That aside, it can of course still be useful to add a
.view()method (but it should certainly make it less critical)ian-r-rose commentedon Jan 18, 2022
Thanks @jorisvandenbossche