import 公式:
%matplotlib inline
import matplotlib.pyplot as plt from
IPython.display import set_matplotlib_formats
import numpy as np
import pandas as pd
import data:
name=pd.read_csv(“iris.csv”, encoding = “ISO-8859-1”)
如果没有encoding就不用加
name.head(15)
name.tail(15)
name.describe()
show the quick statistic summary of your data,e.g. the mean, standard deviation, min, max,
masking data:
name2=name[name[“Sepal.Length”] > 7]
[“Sepal.Length”] > 7是要求,name文件里sepal类目大于7的set
name3 = name2[name2[“Sepal.Width”] == mask[“Sepal.Width”].max()]
在这组数据里找出符合要求的用==
visualize data joint plot
import seaborn as sns
sns.set()
先import公式
sns.jointplot(name[“Sepal.Length”], name[“Sepal.Width”], kind = “regs”)
sns.图表类型(文件x,文件y,kind=“regression”)