100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > 泰坦尼克号(titanic)数据集字段解释 数据导入实战

泰坦尼克号(titanic)数据集字段解释 数据导入实战

时间:2022-09-30 00:44:17

相关推荐

泰坦尼克号(titanic)数据集字段解释 数据导入实战

泰坦尼克号(titanic)数据集字段解释、数据导入实战

目录

泰坦尼克号(titanic)数据集字段解释、数据导入实战

#数据字段说明

#导入数据

#数据字段说明

# 尽管在沉船事件中幸存下有‘一些运气’因素,但有些人比其他人更容易存活下来,比如女人,孩子和上流社会。

# “最惨的是下流社会的男人”,至少在西方社会是这样的。

#同时也看到了人道的光辉。

passengerid: 乘客 ID

class: 舱位等级 (1 = 1st, 2 = 2nd, 3 = 3rd)**

name: 乘客姓名

sex: 性别

age: 年龄

sibsp: 在船上的兄弟姐妹/配偶个数

parch: 在船上的父母/小孩个数

ticket: 船票信息

fare: 票价

cabin: 客舱

embarked: 登船港口 (C = Cherbourg, Q = Queenstown, S = Southampton)

survived: 变量预测为值 0 或 1(这里 1 表示幸存,0 表示遇难)

pclass: A proxy for socio-economic status (SES) 1st = Upper 2nd = Middle 3rd = Lower

age: Age is fractional if less than 1. If the age is estimated, is it in the form of xx.5

sibsp: The dataset defines family relations in this way… Sibling = brother, sister, stepbrother, stepsister Spouse = husband, wife (mistresses and fiancés were ignored)

parch: The dataset defines family relations in this way… Parent = mother, father Child = daughter, son, stepdaughter, stepson Some children travelled only with a nanny, therefore parch=0 for them.

#导入数据

# df=pd.read_csv("E:\\projects\\EDA\\titanic.csv")df=pd.read_excel("E:\\projects\\EDA\\titanic.xls")

参考:kaggle

参考:titanic

参考:泰坦尼克号数据集_Kaggle | 泰坦尼克号幸存分析(字段介绍)

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。