SNS Seaborn AS Import
Import PANDAS AS PD
Import matplotlib.pyplot AS PLT
sns.set_style ( 'White', { 'serif-font.sans': [ 'simhei', 'Arial']})
from sklearn.datasets load_iris Import
Data = load_iris () # loading iris data set
tt = pd.DataFrame (data = data.data, columns = data.feature_names) # converts the data into data sets Panda
TT [ 'Species'] = # data.target the iris type was added to the dataset
data = TT
# in order to facilitate viewing of the column names into Chinese
data.rename (columns = { 'sepal length (cm)': " sepals",
"sepal width (cm & lt)": "sepals wide ",
" petal length (cm & lt) ":" petal length ",
" width petal (cm & lt) ":" petal width ",
" Species ":"Type"}, InPlace = True)
kind_dict = {
0: "Mountain Iris",
1: "Iris versicolor"
2: "Virginia Iris"
}
Data [ "type"] = data [ "type"] .map (kind_dict)
content data.head () # dataset follows
sns.pairplot (data)
python Iris dataset report shows
Guess you like
Origin www.cnblogs.com/zst-blogs/p/12148968.html
Recommended
Ranking