application_vnd.jupyter.stderr_output_1.png
import pandas as pd

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

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

med_age = train.Age.median()
train.Age = train.Age.fillna(med_age)
train.Embarked = train.Embarked.fillna(train.Embarked.mode())

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

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

test.Age = test.Age.fillna(med_age)

test.info()