Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/291.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 熊猫系列箱线图未正确显示_Python_Pandas_Plot_Boxplot - Fatal编程技术网

Python 熊猫系列箱线图未正确显示

Python 熊猫系列箱线图未正确显示,python,pandas,plot,boxplot,Python,Pandas,Plot,Boxplot,我有一个名为a的熊猫系列,a.descripe()给出了这个 count 1116.000 mean 211.495 std 1241.612 min 1.000 25% 16.000 50% 20.000 75% 57.000 max 23220.000 我想用它创建一个方框图,所以我做了a.plot(kind='box'),我得到了: 本系列的前几个条目如下所示: 338.000 17.000 9.

我有一个名为a的熊猫系列,a.descripe()给出了这个

count    1116.000
mean      211.495
std      1241.612
min         1.000
25%        16.000
50%        20.000
75%        57.000
max     23220.000
我想用它创建一个方框图,所以我做了
a.plot(kind='box')
,我得到了: 本系列的前几个条目如下所示:

338.000
17.000
9.000
20.000
68.000
288.000
18.000
25.000
为什么箱线图显示不正确


最大值确实使此绘图无法读取。我决定通过这样做来隐藏异常值:

plt.boxplot(a, showfliers=False)

实际上,关于您的值,您的方框图显示“正确”,因为您的最大值为23220.000。尝试使用的xlim和ylim参数