Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sandeeps-
Copy link

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

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@sandeeps- sandeeps- changed the title "Alone" feature should be true when there are no family members [Titanic] "Alone" feature should be true when there are no family members Aug 27, 2022
@jimmiemunyi
Copy link

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants