以下均为自己看视频做的笔记,自用,侵删!
还参考了:http://www.ai-start.com/ml2014/
In [8]:
%matplotlib inline
import pandas as pd
import matplotlib.pylab as plt iris_data = pd.read_csv('iris.data')
iris_data.columns = ['sepal_length_cm', 'sepal_width_cm', 'petal_length_cm', 'petal_width_cm', 'class']
iris_data.head()
Out[8]:
0 | 4.9 | 3.0 | 1.4 | 0.2 | Iris-setosa |
---|---|---|---|---|---|
1 | 4.7 | 3.2 | 1.3 | 0.2 | Iris-setosa |
2 | 4.6 | 3.1 | 1.5 | 0.2 | Iris-setosa |
3 | 5.0 | 3.6 | 1.4 | 0.2 | Iris-setosa |
4 | 5.4 | 3.9 | 1.7 | 0.4 | Iris-setosa |
In [9]:
from PIL import Image
img = Image.open('test.jpg')
plt.imshow(img)
plt.show()