I am having issues when running OneHotEncoder. On a jupyter notebook I get a lot of warnings:
feature_engine\encoding\onehot.py:277: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling frame.insert many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use newframe = frame.copy()
X[f"{feature}{category}"] = np.where(X[feature] == category, 1, 0)
Is this expected?
I am running Feature Engine version 1.6.1
Pandas version: 2.03
I am having issues when running OneHotEncoder. On a jupyter notebook I get a lot of warnings:
feature_engine\encoding\onehot.py:277: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling
frame.insert
many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, usenewframe = frame.copy()
X[f"{feature}{category}"] = np.where(X[feature] == category, 1, 0)Is this expected?
I am running Feature Engine version 1.6.1 Pandas version: 2.03