text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

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

import seaborn as sns

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

train.columns

train.isnull()

fig, ax = plt.subplots(1, 2, figsize=(12, 6))
train['Survived'].value_counts().plot.pie(explode=[0, 0.1], autopct='%1.1f%%', ax=ax[0], shadow=True, startangle=90, colormap='OrRd_r')
sns.countplot('Survived', data=train, ax=ax[1], palette='OrRd')
ax[0].set_title('Pie plot - Survivrd')
ax[1].set_title('Count plot - Survived')
ax[0].set_ylabel('Survival')
plt.show()