热线电话:13121318867

登录
2018-12-08 阅读量: 751
python怎么绘制箱线图?

Box图用于表示图上的统计数据。它有助于总结数据中存在的各种数据组的统计特性。

# import necessary modules

from bokeh.charts import BoxPlot, output_notebook, show

import pandas as pd

# output to notebook

output_notebook()

# read data in dataframe

df = pd.read_csv(r"D:/kaggle / mcdonald / menu.csv")

# create bar

p = BoxPlot(df, values = "Protein", label = "Category",

color = "yellow", title = "Protein Summary (grouped by category)",

legend = "top_right")

# show the results

show(p)

0.0000
2
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子