Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Last active March 16, 2020 10:05
Show Gist options
  • Save aniruddha27/f8468b31e6c4daf3c8555fac17eccb09 to your computer and use it in GitHub Desktop.
Save aniruddha27/f8468b31e6c4daf3c8555fac17eccb09 to your computer and use it in GitHub Desktop.
# Total number of bathrooms in the house
train['TotalBath'] = train.apply(lambda x: x['FullBath'] + 0.5*x['HalfBath'] + x['BsmtFullBath'] + 0.5*x['BsmtHalfBath'], axis=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment