Last active
August 18, 2018 19:06
-
-
Save mmmayo13/b9ffaea774058ec2a267055de775a276 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
# Determine if the passenger is alone or with family | |
titanic_full['Alone'] = np.where((titanic_full['SibSp']==0) & (titanic_full['Parch']==0), 1, 0) | |
# Drop SibSp & Parch | |
titanic_full.drop(['SibSp'], axis=1, inplace=True) | |
titanic_full.drop(['Parch'], axis=1, inplace=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment