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

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

all_data = pd.concat((train.loc[:, 'Pclass':'Embarked'], test.loc[:, 'Pclass':'Embarked']))

all_data = all_data.drop(['Name'], axis=1)
all_data = pd.get_dummies(all_data)
all_data.head()