泰坦尼克号(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 | 泰坦尼克号幸存分析(字段介绍)

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Data+Science+Insight

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值