Skip to content

Commit

Permalink
frame._data deprecated in pandas, see pandas-dev/pandas#52003.
Browse files Browse the repository at this point in the history
  • Loading branch information
j-bennet committed Mar 17, 2023
1 parent 2f21123 commit 5f7dd4a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dask/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,8 @@ def normalize_dataclass(obj):
def register_pandas():
import pandas as pd

pandas_version = parse_version(pd.__version__)

@normalize_token.register(pd.Index)
def normalize_index(ind):
values = ind.array
Expand Down Expand Up @@ -1141,7 +1143,7 @@ def normalize_series(s):

@normalize_token.register(pd.DataFrame)
def normalize_dataframe(df):
mgr = df._data
mgr = df._mgr if pandas_version.major >= 2 else df._data

data = list(mgr.arrays) + [df.columns, df.index]
return list(map(normalize_token, data))
Expand Down

0 comments on commit 5f7dd4a

Please sign in to comment.