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

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

import seaborn as sns

train = pd.read_csv('/kaggle/input/spaceship-titanic/train.csv')

train.isna().sum()

train.isna().sum()

fig, ax = plt.subplots(1, 2)
fig.set_figheight(5)
fig.set_figwidth(12)
sns.countplot(train, x='CryoSleep', ax=ax[0])
sns.countplot(train, x='CryoSleep', hue="Transported", ax=ax[1])

fig, ax = plt.subplots(1, 3)
fig.set_figheight(5)
fig.set_figwidth(16)
sns.histplot(data=train, x='Age', kde=True, hue='Transported', ax=ax[0])
sns.kdeplot(data=train, x='Age', hue='Transported', ax=ax[1])
sns.boxplot(data=train, x='Transported', y='Age', ax=ax[2])