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

import random

df = pd.read_csv('../input/train.csv')
t = pd.DataFrame({'Validation': list(map(lambda x: random.random() < 0.3, range(891)))})
C = pd.concat([df, t], axis=1)
features = ['Pclass', 'Sex', 'Age', 'SibSp', 'Parch', 'Fare']
y_train = df['Survived'].values
x_train = df[features].values
print(len(x_train))