import matplotlib.pylab as plot import pandas as pd data = pd.DataFrame([[1, 200, 105, 3, False], [2, 165, 80, 2, False], [3, 184.5, 120, 2, False], [4, 116, 70.8, 1, False], [5, 270, 150, 4, True]]) print(data) print('----------------') #第一行的前三列 dataRow1=data.iloc[1,0:3] #第二行的前三列 dataRow2=data.iloc[2,0:3] print(dataRow1) print(dataRow2) print('----------------') plot.scatter(dataRow1,dataRow2) plot.xlabel("Attribute1") plot.ylabel("Attribute2") plot.show() dataRow3=data.iloc[3,0:3] plot.scatter(dataRow2,dataRow3) plot.xlabel("Attribute2") plot.ylabel("Attribute3") plot.show() array=dataFile.iloc[:,10:16].values boxplot(array) plot.xlabel("Attribute") plot.ylabel("score") show()