有没有办法将仅显示文本的小部件添加到 Bokeh 仪表板布局?

Is there a way to add a widget that only displays text to a Bokeh dashboard layout?

我只想将 pandas 数据框列的收入中位数显示为 widget/box 内的文本,随着时间的推移添加更多数据,该列会发生变化。

编辑: 我能够找到帮助您添加包含 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