Skip to content

Commit cee3313

Browse files
committed
Silence Pandas deprecation warning
1 parent b919396 commit cee3313

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

khiops/sklearn/dataset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,9 +614,9 @@ def _init_target_column(self, y):
614614
else:
615615
y_checked = _column_or_1d_with_dtype(y, dtype=y.dtype)
616616
elif hasattr(y, "dtypes"):
617-
if isinstance(y.dtypes[0], pd.CategoricalDtype):
617+
if isinstance(y.dtypes.iloc[0], pd.CategoricalDtype):
618618
y_checked = _column_or_1d_with_dtype(
619-
y, dtype=y.dtypes[0].categories.dtype
619+
y, dtype=y.dtypes.iloc[0].categories.dtype
620620
)
621621
else:
622622
y_checked = _column_or_1d_with_dtype(y)

0 commit comments

Comments
 (0)