Skip to content

Commit 1ecdea1

Browse files
committed
pandas dataframe drop does not support keyword argument columns anymore
1 parent f4c3302 commit 1ecdea1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

python/hsfs/engine/python.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,12 @@ def split_labels(
930930
]:
931931
if labels:
932932
labels_df = df[labels]
933-
df_new = df.drop(columns=labels)
933+
if HAS_POLARS and (
934+
isinstance(df, pl.DataFrame) or isinstance(df, pl.dataframe.frame.DataFrame)
935+
):
936+
df_new = df.drop(labels)
937+
else:
938+
df_new = df.drop(columns=labels)
934939
return (
935940
self._return_dataframe_type(df_new, dataframe_type),
936941
self._return_dataframe_type(labels_df, dataframe_type),

python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ dev-pandas1 = [
9494
]
9595
dev = ["hopsworks[dev-no-opt,great-expectations,polars]"]
9696
polars=[
97-
"polars>=0.20.18,<=1.31.0",
97+
"polars>=1.8.2,<=1.31.0",
9898
"pyarrow>=17.0",
9999
]
100100

0 commit comments

Comments
 (0)