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

import pandas as pd

import seaborn as sns

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

space_torr = train_df.corr()

sns.set(font_scale=1.5)
colors = sns.color_palette('Paired')
explode = (0.05, 0.05)

plt.figure(figsize=(15, 10))
sns.histplot(data=train_df, x='Age', bins=20, hue='Transported', color=sns.color_palette('flare', as_cmap=True), binwidth=1, kde=True)
plt.title('Distribution de la variable Age', fontsize=18)
plt.xlabel('Age', fontsize=18)
plt.ylabel('Nombre de passagers', fontsize=18)