Skip to content

Commit 104d198

Browse files
authored
Merge pull request #63 from PythonPredictions/fix/issue#37
fix #37 set copy warning
2 parents e6d1be7 + b1ccf74 commit 104d198

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)