kaggle案例-学生在考试数据集
数据集优快云下载链接:https://download.youkuaiyun.com/download/zhangvalue/12273323
数据集包括8个变量
- gender 性别
- race/ethnicity 种族
- parental level of education 父母教育水平
- lunch 午餐
- test preparation course
- math score 数学
- reading score 阅读
- writting score 写作
第一步:简单查看数据
# *===================================*
# -*- coding: utf-8 -*-
# * Time : 2019-12-06 18:31
# * Author : zhangsf
# *===================================*
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
sp = pd.read_csv("../data/StudentsPerformance.csv") # 读入数据
print(len(sp))
print(sp.head()) # 查看数据前5行
print(sp.isnull().sum()) # 查看数据是否包括缺失值
print(sp.gender.value_counts()) # value_counts()函数显示唯一值及其出现次数
sp['Percentage'] = sp['math score'] + sp['readin

最低0.47元/天 解锁文章
240

被折叠的 条评论
为什么被折叠?



