柳鲲鹏
代码如下:
import pandas as pd import matplotlib.pyplot as plot # filePath = ("e://data/dataTest.csv") filePath = ("E://TensorFlow深度学习应用实践/data/dataTest.csv") dataFile = pd.read_csv(filePath,header=None, prefix="V") dataRow1 = dataFile.iloc[100,1:300] dataRow2 = dataFile.iloc[101,1:300] plot.scatter(dataRow1, dataRow2) plot.xlabel("Attribute1") plot.ylabel("Attribute2") plot.show()
吾尝试了多种写法,都不成功:
filePath = (u"E://TensorFlow深度学习应用实践/data/dataTest.csv") filePath = (r"E://TensorFlow深度学习应用实践/data/dataTest.csv") filePath = ("E://TensorFlow深度学习应用实践/data/dataTest.csv".encode('gbk'))
filePath = unicode("E://TensorFlow深度学习应用实践/data/dataTest.csv", "utf-8")
#-*- coding:cp936 -*-