text_html_output_1.png
import pandas as pd

test_df = pd.read_csv('/kaggle/input/titanic/test.csv')
train_df = pd.read_csv('/kaggle/input/titanic/train.csv')
test_passengerId = test_df['PassengerId']

train_df[['Parch', 'SibSp', 'Survived']].groupby(['Parch', 'SibSp'], as_index=False).mean().sort_values(by='Survived', ascending=False)