[英]How to use decimals in seaborn.distplot()?
In my code, I am trying to learn distributions of data.在我的代码中,我试图学习数据的分布。 My data is as follows:
我的数据如下:
18.86
19.86
18.98
18.31
18.76
17.78
17.05
16.75
...
Is there a way to plot these values as distplot() only accepts slices and ints?有没有办法 plot 这些值作为 distplot() 只接受切片和整数?
CODE:代码:
import seaborn as sns
x = [18.86,19.86,18.98,18.31,18.76,17.78,17.05,16.75]
ax = sns.distplot(x)
Distplot accepts Parameters a Series, 1d-array, or list. Distplot 接受参数系列、一维数组或列表。
https://seaborn.pydata.org/generated/seaborn.distplot.html for more detail. https://seaborn.pydata.org/generated/seaborn.distplot.html了解更多详情。
Always follow official documents.始终遵循官方文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.