text_plain_output_1.png image_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sn

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

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

print('Number of people embarking in Southampton (S):')
southampton = train[train['Embarked'] == 'S'].shape[0]
print(southampton)
print('Number of people embarking in Cherbourg (C):')
cherbourg = train[train['Embarked'] == 'C'].shape[0]
print(cherbourg)
print('Number of people embarking in Queenstown (Q):')
queenstown = train[train['Embarked'] == 'Q'].shape[0]
print(queenstown)