Created
March 21, 2018 23:06
-
-
Save mmmayo13/b2feb567a14d5b96122e8116c17f4c30 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
titanic_full = pd.concat([titanic_full.drop('Pclass', axis=1), pd.get_dummies(titanic_full['Pclass'], prefix='Class')], axis=1) | |
titanic_full = pd.concat([titanic_full.drop('Embarked', axis=1), pd.get_dummies(titanic_full['Embarked'], prefix='Embarked')], axis=1) | |
titanic_full = pd.concat([titanic_full.drop('Title', axis=1), pd.get_dummies(titanic_full['Title'], prefix='Title')], axis=1) | |
titanic_full.name = 'titanic_full' # need to reset, as this is a copy of original df |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment