text_html_output_1.png
import pandas as pd

train_data = pd.read_csv('../input/train.csv')
test_data = pd.read_csv('../input/test.csv')

train_data.drop(['PassengerId', 'Ticket', 'Cabin', 'Name'], inplace=True, axis=1)

y_surv = [len(train_data[(train_data['Survived'] == 1) & (train_data['Pclass'] == 1)]['Pclass'].tolist()), len(train_data[(train_data['Survived'] == 1) & (train_data['Pclass'] == 2)]['Pclass'].tolist()), len(train_data[(train_data['Survived'] == 1) & (train_data['Pclass'] == 3)]['Pclass'].tolist())]
y_not_surv = [len(train_data[(train_data['Survived'] == 0) & (train_data['Pclass'] == 1)]['Pclass'].tolist()), len(train_data[(train_data['Survived'] == 0) & (train_data['Pclass'] == 2)]['Pclass'].tolist()), len(train_data[(train_data['Survived'] == 0) & (train_data['Pclass'] == 3)]['Pclass'].tolist())]
(y_surv, y_not_surv)