导包
from pyecharts.charts import Boxplot
import numpy as np
import pandas as pd
数据
grade = pd.read_csv("..\Pyecharts可视化课程课件\data\student_grade.txt",sep="\t")
y = Boxplot.prepare_data([grade["语文"],grade["数学"],grade["英语"]])
x = grade.columns[1:4]
/*数据需要处理成二维列表
绘图
boxplot = (Boxplot()
.add_xaxis(list(x))
.add_yaxis("一号店铺",y))
boxplot.render_notebook()