#引入xgboost包
from numpy import loadtxt
from xgboost import XGBClassifier
from sklearn.metrics import accuracy_score
from sklearn.model_selection import train_test_split
#分出变量和标签
dataset=loadtxt('game/pima-indians-diabetes.csv')
修改:
#分出变量和标签
dataset=loadtxt('game/pima-indians-diabetes.csv',delimiter=",")