course22 icon indicating copy to clipboard operation
course22 copied to clipboard

[Titanic] "Alone" feature should be true when there are no family members

Open sandeeps- opened this issue 2 years ago • 2 comments

Family members = number of siblings/spouses + number of parents/childen Family members == 0 ==> Alone is true Currently it is set as df['Alone'] = df.Family==1 My change makes it: df['Alone'] = df.Family!=1

sandeeps- avatar Aug 27 '22 16:08 sandeeps-

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Shouldn't the code then be:

df['Alone'] > 0

instead of

df['Alone'] = df.Family!=1

For the latter one, if the number of family members is say 2, then your code would return True, which is not what we want

jimmiemunyi avatar Sep 29 '22 13:09 jimmiemunyi