我只想将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)
答案 0 :(得分:0)
使用Div
并通过设置
my_div.text = new_content