一、导入模块和数据
数据源:Iris Species
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
iris = pd.read_csv('C:/Dataset/201908_ML_with_iris/iris.csv')
iris.head()
iris.drop('Unnamed: 0',axis = 1,inplace = True)
iris.columns = ['SepalLengthCm', 'SepalWidthCm', 'PetalLengthCm', 'PetalWidthCm',
'Species']
iris.info()
iris.Species.value_counts()
花瓣petal,花萼sepal说明
二、EDA 数据探索
三种品类花萼长宽分布
fig = iris[iris.Species=='setosa'].plot(kind='scatter',x='SepalLengthCm',y='SepalWidthCm',color='r',label = 'setosa')
iris[iris.Species=='versicolor'].plot(kind='scatter',x='SepalLengthCm',y='SepalWidthCm',color='b',label = 'v