We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2b6aa16 + 2cdb009 commit bef7984Copy full SHA for bef7984
supervised/algorithms/catboost.py
@@ -198,9 +198,10 @@ def fit(
198
for i in range(X.shape[1]):
199
if PreprocessingUtils.is_categorical(X.iloc[:, i]):
200
self.cat_features += [i]
201
- X.iloc[:, i] = X.iloc[:, i].astype(str)
+ col_name = X.columns[i]
202
+ X[col_name] = X[col_name].astype(str)
203
if X_validation is not None:
- X_validation.iloc[:, i] = X_validation.iloc[:, i].astype(str)
204
+ X_validation[col_name] = X_validation[col_name].astype(str)
205
206
eval_set = None
207
if X_validation is not None and y_validation is not None:
0 commit comments