Last active
August 19, 2019 14:49
-
-
Save ArthurEzenwanne/97795e906ed55364aa7713c9d168d25e to your computer and use it in GitHub Desktop.
This file contains 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
# Get the names of columns with missing values | |
cols_with_missing = [col for col in X_train.columns if X_train[col].isnull().any()] | |
# Drop columns in training and validation data containing missing values | |
reduced_X_train = X_train.drop(cols_with_missing, axis=1) | |
reduced_X_valid = X_valid.drop(cols_with_missing, axis=1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment