text_plain_output_1.png
from sklearn.model_selection import train_test_split

import pandas as pd        # For loading and processing the dataset

df_train = pd.read_csv('../input/train.csv')

df_train = df_train.drop(['PassengerId', 'Name', 'Ticket', 'Cabin'], axis=1)

df_train = pd.concat([df_train, pd.get_dummies(df_train['Embarked'], prefix='Embarked')], axis=1)
df_train = df_train.drop('Embarked', axis=1)

X_train = df_train.drop('Survived', axis=1).as_matrix()
y_train = df_train['Survived'].as_matrix()
X_train, X_test, y_train, y_test = train_test_split(X_train, y_train, test_size=0.2)

y_train