我正在尝试使用Bokeh查看以下代码的数据,但Bokeh无法导入。我正在使用jupyter Notebook。
from bokeh.plotting import figure,show
from bokeh.model import HoverTool
TOOLTIPS = HoverTool(tooltips = [
("index", "$index"),
("(Wage,Value)", "(@Wage, @Value)"),
("Name", "@Name")]
)
p = figure(title="Soccer 2219", x_axis_label='Wage', y_axis_label='Value', plot_width = 700, plot_height = 700, tools=[TOOLTIPS])
p.circle('Wage', 'Value', size = 10, source = df1)
show(p)错误消息:
ImportError Traceback (most recent call last)
in
1 from bokeh.plotting import figure,show
----> 2 from bokeh.model import HoverTool
3
4 TOOLTIPS = HoverTool(tooltips = [
5 ("index", "$index"),
ImportError: cannot import name 'HoverTool' from 'bokeh.model'发布于 2021-02-25 09:33:43
你试过检查打字错误吗?
from bokeh.models import HoverToolhttps://stackoverflow.com/questions/66361172
复制相似问题