Skip to content

Instantly share code, notes, and snippets.

@mmmayo13
Created March 21, 2018 23:04
Show Gist options
  • Save mmmayo13/2f476c8b0da47e3a9dee7a12a5835ea6 to your computer and use it in GitHub Desktop.
Save mmmayo13/2f476c8b0da47e3a9dee7a12a5835ea6 to your computer and use it in GitHub Desktop.
# Drop the 2 Embarked missing values
titanic_full.dropna(subset = ['Embarked'], inplace=True)
# Replace missing Fare value with mean; this value is in our test set (see further above)
titanic_full['Fare'].fillna((titanic_full['Fare'].mean()), inplace=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment