Last active
June 20, 2017 16:25
-
-
Save FranciscusRenatus/6ddb3c53d8bb552329f8659c411b5897 to your computer and use it in GitHub Desktop.
code-snippet
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
#Taking care of missing data using Python | |
from sklearn.preprocessing import Imputer | |
imputer = Imputer(missing_values = 'NaN', strategy = 'mean', axis=0) | |
imputer = imputer.fit(X[:,1:3]) | |
X[:, 1:3] = imputer.transform(X[:, 1:3]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment