text_plain_output_1.png
import pandas as pd

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

train.columns

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