I'm analyzing Titanic data from Kaggle1 with a kind of guiding book. In the book, feature analyzing about the relationship between Pclass data and Survived data is done like below.
train_set = pd.read_csv('train_csv)
fig = plt.figure(figsize=(12,4))
ax1 = fig.add_subplot(121)
PclassPlot = train_set['Survived].groupby(train_set['Pclass]).mean()
Why do you need to use mean data? I thought I didn't need to culcalate mean to see the relationship between Pclass and Survived data.
Please give me tips for analyzing data. Thank you for your help.