数据导入
(1)python标准类库导入
(2)用numpy模块导入
(3)用pandas导入
from pandas import read_csv
filename='pima-indians-diabetes.csv'
names=['preg','plas','pres','skin','test','mass','pedi','age','class']
data=read_csv(filename,names=names)
数据描述
(1)描述性统计
from pandas import set_option
set_option('precision',4)
print(data.describe())
(2)数据的分组分布
print(data.groupby('class').si