#数据处理:titanic = titanic.drop(['Cabin','PassengerId','Ticket'], axis=1)#看等级和Survived之间的关系titanic[['Pclass','Survived']].groupby(['Pclass'], as_index=False).mean().sort_values(by='Survived', ascending=False) >>Pclass Survived 0 1 0.629630 1 2 0.472826 2 3 0.242363 >>...