Created
March 20, 2022 18:12
-
-
Save kshirsagarsiddharth/b855e7ef3252460a4c1cce0059e993bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove categorical columns (will replace with one-hot encoding) | |
sc = StandardScaler() | |
sc_cols_train = pd.DataFrame(sc.fit_transform(X_train[numeric_columns])) | |
sc_cols_valid = pd.DataFrame(sc.transform(X_valid[numeric_columns])) | |
# One-hot encoding removed index; put it back | |
sc_cols_train.index = X_train.index | |
sc_cols_valid.index = X_valid.index |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment