application_vnd.jupyter.stderr_output_1.png
import pandas as pd

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

train.isnull().sum()

train_x = train[['Pclass', 'Sex']]

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