一.材料准备

https://www.kaggle.com/c/titanic-gettingStarted/

二.提出问题

  生存率和哪些因素有关(性别,年龄,是否有伴侣,票价,舱位等级,包间,出发地点)

  1.乘客的年龄和票价的分布

  2.样本生存的几率是多少

  3.乘客的性别比例

  4.乘客的舱位分布

  5.性别和生还有没有关系

  6.舱位等级和生还有没有关系

  7.年龄和生还有没有关系

  8.出发地点和生存率有没有关系

  9.票价和生还有没有关系

  10.有陪伴的乘客的生还几率是否更高

三.编写代码和做出图形来验证所提出的的问题

  1.加载数据

1 %pylab inline
2 %matplotlib inline
3 import seaborn as sns
4 import numpy as np
5 import pandas as pd
6 import matplotlib.pyplot as plt
7 titanic_data = pd.read_csv('titanic-data.csv')
8 titanic_data.info()
View Code

相关文章:

  • 2021-11-27
  • 2021-11-02
  • 2021-12-05
  • 2021-11-25
  • 2021-05-25
  • 2021-09-02
  • 2022-12-23
  • 2021-12-28
猜你喜欢
  • 2021-10-07
  • 2021-11-05
  • 2021-11-16
  • 2022-12-23
  • 2021-11-15
  • 2021-08-10
  • 2021-10-12
相关资源
相似解决方案