text_html_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sn

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

sn.barplot(x='SibSp', y='Survived', data=train)
print('Percentage of SibSp = 0 who survived:', train['Survived'][train['SibSp'] == 0].value_counts(normalize=True)[1] * 100)
print('Percentage of SibSp = 1 who survived:', train['Survived'][train['SibSp'] == 1].value_counts(normalize=True)[1] * 100)
print('Percentage of SibSp = 2 who survived:', train['Survived'][train['SibSp'] == 2].value_counts(normalize=True)[1] * 100)
print('Percentage of SibSp = 3 who survived:', train['Survived'][train['SibSp'] == 3].value_counts(normalize=True)[1] * 100)