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

import seaborn as sns

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

train_data.isnull().sum()

train_df = train_data.drop('Cabin', axis=True)

categorical_col = train_df.select_dtypes(include=['object']).columns
categorical_col

train_df.isnull().sum()

sns.countplot(x='Survived', hue='Sex', data=train_df)