Commit 3e60b9c1 by BellCodeEditor

auto save

parent e2f8de06
Showing with 147 additions and 0 deletions
from pyecharts.charts import Line
import csv
line=Line()
data = [["姓名", "语文", "数学", "英语"],
["小贝", 98, 99, 92],
["聪聪", 95, 91, 95]]
with open('scores.csv','w',encoding='utf-8',newline='') as csvfile:
writer=csv.writer(csvfile)
writer.writerows(data)
line.add_xaxis(data[1])
line.add_yaxis('聪聪',data[2])
line.add_yaxis('小贝',data[3])
line.set_global_opts(title_opts={'test':'聪聪,小杰,皮皮成绩统计图','subtest':'高254班数学'})
line.render()
姓名,语文,数学,英语,,,
姓名,语文,数学,英语,,,
张三,27 ,94 ,51 ,,,
李四,76 ,96 ,0 ,,,
王五,67 ,45 ,80 ,,,
robin,34 ,88 ,42 ,,,
tim,2 ,47 ,58 ,,,
tom,42 ,68 ,15 ,,,
rose,93 ,99 ,3 ,,,
lisa,68 ,83 ,17 ,,,
role,14 ,77 ,64 ,,,
tone,58 ,87 ,56 ,,,
lone,65 ,17 ,42 ,,,
kim,80 ,51 ,33 ,,,
lola,4 ,57 ,79 ,,,
lady gaga,17 ,93 ,45 ,,,
black,6 ,17 ,93 ,,,
write,35 ,83 ,68 ,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
,,,,,,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment