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

train = pd.read_csv('train.csv')

test = pd.read_csv('test.csv')

test_x = test[['Pclass', 'Sex']]

test_x['Sex'].replace('male', 1, inplace=True)
test_x['Sex'].replace('female', 0, inplace=True)
test_x.head()