application_vnd.jupyter.stderr_output_1.png image_output_1.png
import pandas as pd

train_df = pd.read_csv('../input/titanic/train.csv')
test_df = pd.read_csv('../input/titanic/test.csv')
sample_sub = pd.read_csv('../input/titanic/gender_submission.csv')

y = train_df['Survived']
features = train_df.drop(['Survived'], axis=1)

percent_survived = train_df.Survived.sum() / train_df.Survived.count()
print(f'Class: 0 = {1 - percent_survived:.2f} 1 = {percent_survived:.2f}')