text_plain_output_1.png
import pandas as pd

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

train[['Deck', 'Cabin_Num', 'Side']] = train.Cabin.str.split('/', expand=True)
test[['Deck', 'Cabin_Num', 'Side']] = test.Cabin.str.split('/', expand=True)

train[['Group', 'Group_Num']] = train.PassengerId.str.split('_', expand=True)
test[['Group', 'Group_Num']] = test.PassengerId.str.split('_', expand=True)

for i in train.columns:
    print(f'{i}: {train[i].nunique()}')