Skip to content

Instantly share code, notes, and snippets.

@BinarySpoon
Last active February 25, 2021 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BinarySpoon/c027163fee93c9e7513d10be4f27e8a9 to your computer and use it in GitHub Desktop.
Save BinarySpoon/c027163fee93c9e7513d10be4f27e8a9 to your computer and use it in GitHub Desktop.
# B.Setting Up Dataframe -->
train_data = pd.read_csv('data/train.csv')
test_data = pd.read_csv('data/test.csv')
result = pd.read_csv('data/my_submission.csv')
women = train_data.loc[train_data.Sex == 'female']["Survived"]
rate_women = sum(women)/len(women)
men = train_data.loc[train_data.Sex =='male']["Survived"]
rate_men = sum(men)/len(men)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment