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)


暂无数据
推荐帖子
0条评论
0条评论
0条评论