text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

train = pd.read_csv('../input/titanic/train.csv')
test = pd.read_csv('../input/titanic/test.csv')

sns.set_style('whitegrid')

train.drop('Cabin', axis=1, inplace=True)

test.drop('Cabin', axis=1, inplace=True)

train = train.fillna(train['Embarked'].value_counts().index[0])
test = test.fillna(test['Fare'].value_counts().index[0])

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

train.head()