Python 如何从图表对象列表中显示()bokeh图表
我试图调用Python 如何从图表对象列表中显示()bokeh图表,python,bokeh,Python,Bokeh,我试图调用show()函数,将列表元素作为参数传递,但出现以下错误: AttributeError:“int”对象没有属性“references” 我用的是jupyter笔记本 这是我的密码: from bokeh.charts import HeatMap from bokeh.charts import output_file, show b = [] for i,x in enumerate(c): df = result_dados[result_dados['Diretori
show()
函数,将列表元素作为参数传递,但出现以下错误:
AttributeError:“int”对象没有属性“references”
我用的是jupyter笔记本
这是我的密码:
from bokeh.charts import HeatMap
from bokeh.charts import output_file, show
b = []
for i,x in enumerate(c):
df = result_dados[result_dados['Diretoria_2']==c[i]]
hm = HeatMap(df, y='quest_no', x='respondente', values = 'resposta', \
stat='mean', width=800, plot_height=600)
b.append(hm)
output_file('test.html', title="heatmap test")
show(b[11])
列表的元素都是bokeh.charts.chart.chart
我注意到,如果我为同一个列表元素运行两次代码,就会显示图表。有什么提示可以让它在第一次成功运行吗?你能为“c”添加代码吗?c是从pd数据帧获得的列表:['Dir1','Dir2','Dir3',…,'Dir20']。c的代码是:c=a.Diretoria.tolist()很久以前,我犯了同样的错误,发现原因是Jupyter笔记本。重新安装解决了。你能添加“c”的代码吗?c是从pd数据帧获取的列表:['Dir1','Dir2','Dir3',…,'Dir20']。c的代码是:c=a.Diretoria.tolist()很久以前,我也犯了同样的错误,发现原因是Jupyter笔记本。重新安装解决了。