text_plain_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

train_df = pd.read_csv('../input/train.csv')
train_df = train_df[pd.isnull(train_df['Age']) == False]
features = train_df.drop(['PassengerId', 'Survived', 'Name', 'Ticket'], axis=1)
labels = train_df['Survived']
n_samples = len(train_df)
n_features = len(features.columns)
n_survived = labels.value_counts()[1]
n_died = labels.value_counts()[0]
print('Number of training samples: {}'.format(n_samples))
print('Number of features: {}'.format(n_features))
print('Number of survivors: {}'.format(n_survived))
print('Number of deaths: {}'.format(n_died))