1.根据列位置划分
execldata = pd.read_excel(filepath)
# 获取列数
bandscount = execldata.shape[1]
#去除最后一列数据类别
bandscount = bandscount - 1
classifypointdata = execldata[:, 0:bandscount]
classifypointlabel = execldata[:, -1]
2.根据字段名称进行划分
execldata = pd.read_excel(filepath)
#分类字段
Classificationfield = 'MnCLASS'
classifypointdata = execldata.drop(columns=[Classificationfield])
classifypointlabel = execldata[Classificationfield]