import numpy as np
import pandas as pd
from pylab import rcParams
%matplotlib inline
rcParams['figure.figsize']=5,4
#iris csv file from website: https://gist.github.com/curran/a08a1080b88344b0c8a7
address: myFilePath
df= pd.read_csv(address, header=None, sep=',')
df.columns=['Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width', 'Species']
df.boxplot(return_type='dict')
plt.plot()
x=df.iloc[:, 0:4].values
y=df.iloc[:, 4:].values
df.head(5)
Sepal_Width = x[:, 1]
iris_outliers = (Sepal_Width < 2.05)
df[iris_outliers]
我尝试更改return_type ='axes'并发生相同的错误。我还更改了第二个示例的比较运算符,即使这些是标准操作,它也不起作用。