import numpy as np
url = 'F:\Coding\Anaconda\DataAnalogy\Data\iris.csv'
'''
with open(url, encoding = 'utf-8') as fp:
data = np.loadtxt(fp, str, delimiter = ',', usecols=(0,1,2,3,4))#将csv文件以str格式读出,加上参数skipprows = n表示忽略第n行
print(data)
'''
data = np.loadtxt(url, dtype=float, delimiter=',', skiprows=1, usecols=(0, 1, 2, 3, 4))#忽略第一行载入前五列元素
data = np.array(data)#将数据转换为numpy能够识别的数组
Petal_width_Sum = -1#属性之和
Petal_width_Len = -1#行数 == data.shape[0]
Petal_width_Ave = -1#平均值
Petal_width_More = -1#众数
Petal_width_Max = -1#最大值
Petal_width_Min = -1#最小值
Petal_width_Vp = -1#极差
Petal_width_Mid = -1#中位数
Petal_length_Sum = -1
Petal_length_Len = -1
Petal_length_Ave = -1
Petal_length_More = -1
Petal_length_Max = -1
Petal_length_Min = -1
Petal_length_Vp = -1
Petal_length_Mid = -