源代码
#获取数据
data=pd.read_csv(r"D:\python file\Machine_Learning\Machine_Learning\resources\FBlocation\train.csv")
报错原因:文件路径中包含中文字符
解决方法:修改路径名称改为全英文路径
data=pd.read_csv(r"D:\pythonfile\Machine_Learning\Machine_Learning\resources\FBlocation\train.csv",skiprows=1,header=None,engine='python')