Machine Learning, Data Science, Python, Classification.
test[‘Pclass’].apply(num2cat) train.pop(‘Pclass’) test.pop(‘Pclass’) Family size feature We extract the family size for each passenger. train[‘Family’] = train[‘SibSp’] + train[‘Parch’] + 1 test[‘Family’] = test[‘SibSp’] + test[‘Parch’] + 1 train.pop(‘SibSp’) test.pop(‘SibSp’) train.pop(‘Parch’)