Numpy库中的矩阵模块为ndarray对象
import pandas as pd
from random import shuffle#随机函数shuffle
datafile='E:/python/data/chapter6/try/model.xls'
data=pd.read_excel(datafile)
data=data.as_matrix()#将表格转化为矩阵
shuffle(data)#随机打乱数据
Numpy库中的矩阵模块为ndarray对象
import pandas as pd
from random import shuffle#随机函数shuffle
datafile='E:/python/data/chapter6/try/model.xls'
data=pd.read_excel(datafile)
data=data.as_matrix()#将表格转化为矩阵
shuffle(data)#随机打乱数据