学生考试数据集数据分析

准备工作

下载数据集

下载地址:Students Performance in Exams
下载时需要登录,选择最后一项skp&continue download即可.

查看数据结构

在这里插入图片描述

字段描述
gender性别
race/ethnicity种族
parental level of education父母教育水平
lunch午餐
test preparation course
math score数学
reading score阅读
writting score写作

数据分析

查看数据

查看各列信息,可以看到总共有1000行,每行八列数据

data.info()

<class 'pandas.core.frame.DataFrame'>
RangeIndex: 1000 entries, 0 to 999
Data columns (total 8 columns):
gender                         1000 non-null object
race/ethnicity                 1000 non-null object
parental level of education    1000 non-null object
lunch                          1000 non-null object
test preparation course        1000 non-null object
math score                     1000 non-null int64
reading score                  1000 non-null int64
writing score                  1000 non-null int64
dtypes: int64(3), object(5)
memory usage: 62.6+ KB

data.describe()

数字列的最大最小值,平均值等
在这里插入图片描述

data.isnull().sum()

空值统计
在这里插入图片描述

分析数据

柱状图

显示不同种族学生的人数

plt.figure(figsize=(20, 10))
sns.countplot(data=data, x='race/ethnicity')

在这里插入图片描述

绘制饼图

根据种族数量绘制饼状图

 data['race/ethnicity'].value_counts().plot.pie()

在这里插入图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值