Skip to content

Commit 30d5df7

Browse files
authored
Fixup deprecation warning from pandas (#8564)
1 parent e72d2b2 commit 30d5df7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

distributed/shuffle/_arrow.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ def convert_shards(
9393
):
9494
continue
9595
reconciled_dtypes[column] = find_common_type([actual, dtype])
96-
return df.astype(reconciled_dtypes, copy=False)
96+
97+
from dask.dataframe._compat import PANDAS_GE_300
98+
99+
kwargs = {} if PANDAS_GE_300 else {"copy": False}
100+
return df.astype(reconciled_dtypes, **kwargs)
97101

98102

99103
def buffers_to_table(data: list[tuple[int, bytes]]) -> pa.Table:

0 commit comments

Comments
 (0)