Skip to content

Commit

Permalink
train_test_split incorrect column names fix (#998)
Browse files Browse the repository at this point in the history
* train_test_split incorrect column names fix

* fix pep8 issue
  • Loading branch information
PivovarA authored Apr 13, 2022
1 parent 7a39c0a commit 9764b19
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions daal4py/sklearn/model_selection/_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@ def _daal_train_test_split(*arrays, **options):
train_arr.index = train
test_arr.index = test

if hasattr(arr, 'columns'):
train_arr.columns = arr.columns
test_arr.columns = arr.columns

if hasattr(arr, 'name'):
train_arr.name = arr.name
test_arr.name = arr.name

res.append(train_arr)
res.append(test_arr)

Expand Down

0 comments on commit 9764b19

Please sign in to comment.