Skip to content

Commit b1ccf74

Browse files
author
Jan Beníšek
committed
fix #37 set copy warning
1 parent 2b5a107 commit b1ccf74

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

cobra/preprocessing/preprocessor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ def fit(self, train_data: pd.DataFrame, continuous_vars: list,
227227
log.info("Starting to fit pipeline")
228228
start = time.time()
229229

230+
# Ensure to operate on separate copy of data
231+
train_data = train_data.copy()
232+
230233
# Fit discretizer, categorical preprocessor & target encoder
231234
# Note that in order to fit target_encoder, we first have to transform
232235
# the data using the fitted discretizer & categorical_data_processor

0 commit comments

Comments
 (0)