我只想将pandas数据帧列的收入中值显示为小部件/框内的文本,随着时间的推移,随着更多数据的添加,文本会发生变化。
编辑:我找到了这个文档,它可以帮助您添加一个包含DIV元素的小部件。
http://docs.bokeh.org/en/1.3.2/docs/user_guide/interaction/widgets.html#div
示例:
from bokeh.io import output_file, show
from bokeh.models import Div
output_file("div.html")
div = Div(text="""Your <a href="https://en.wikipedia.org/wiki/HTML">HTML</a>-supported text is initialized with the <b>text</b> argument. The
remaining div arguments are <b>width</b> and <b>height</b>. For this example, those values
are <i>200</i> and <i>100</i> respectively.""",
width=200, height=100)
show(div)
使用Div
并通过设置进行更新
my_div.text = new_content