application_vnd.jupyter.stderr_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

train_set = pd.read_csv('train.csv')
test_set = pd.read_csv('test.csv')

cat_cols = ['Survived', 'Sex', 'Pclass', 'Embarked', 'Parch', 'SibSp']
fig, axs = plt.subplots(2, 3, figsize=(16, 9))
plt.subplots_adjust(left=None, bottom=None, right=None, top=None, wspace=0.3, hspace=0.3)
for i in range(2):
    for j in range(3):
        c = i * 3 + j
        ax = axs[i][j]
        sns.countplot(train_set[cat_cols[c]], hue=train_set['Survived'], ax=ax)
        ax.set_title(cat_cols[c], fontsize=14, fontweight='bold')
        ax.grid()