用户:
李老师2020查看:17 回复:2 评论:17 创建时间:2020-05-24T16:58:32
【作品展示】

【作品介绍】
【作品源代码】
import json,webbrowser,os
from pyecharts import Bar
with open ("birthday.json","r") as a:
data=json.load(a)
b=[0]*12
for i in data:
b[int(i)-1]+=1
x=["1","2","3","4","5","6","7","8","9","10","11","12"]
y=b
bar=Bar("出生月份统计")
bar.add("",x,y)
bar.render()
webbrowser.open("file://"+os.path.realpath("render.html"))
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn