Python / Bokeh / Pandas AttributeError:意外的属性“响应”到图

我正在尝试使用bokeh和大熊猫创建图表。如果不包括“,响应= True”,则代码有效。如果包含它,则不起作用。关于我在做什么错的任何建议吗?谢谢!

from bokeh.plotting import figure,output_file,show
import pandas

file="adbe.csv"

df=pandas.read_csv(file,parse_dates=["Date"])

p=figure(width=500,height=500,x_axis_type="datetime",responsive = True)

p.line(df["Date"],df["Close"],color="Orange",alpha=0.5)

output_file("Time_Series.html")
show(p)

这是完整的错误消息: AttributeError Traceback(最近一次通话) 在 6 df = pandas.read_csv(file,parse_dates = [“ Date”]) 7 ----> 8 p =数字(宽度= 500,高度= 500,x_axis_type =“ datetime”,响应= True) 9 10 p.line(df [“ Date”],df [“ Close”],color =“ Orange”,alpha = 0.5)

c:\users\jason\appdata\local\programs\python\python37\lib\site-packages\bokeh\plotting\figure.py in figure(**kwargs)
   1530 
   1531 def figure(**kwargs):
-> 1532     return figure(**kwargs)
   1533 figure.__doc__ = figure.__doc__
   1534 

c:\users\jason\appdata\local\programs\python\python37\lib\site-packages\bokeh\plotting\figure.py in __init__(self,*arg,**kw)
    163             kw['title'] = Title(text=title)
    164 
--> 165         super().__init__(*arg,**kw)
    166 
    167         self.x_range = get_range(opts.x_range)

c:\users\jason\appdata\local\programs\python\python37\lib\site-packages\bokeh\model.py in __init__(self,**kwargs)
    232         kwargs.pop("id",None)
    233 
--> 234         super().__init__(**kwargs)
    235         default_theme.apply_to_model(self)
    236 

c:\users\jason\appdata\local\programs\python\python37\lib\site-packages\bokeh\core\has_props.py in __init__(self,**properties)
    245 
    246         for name,value in properties.items():
--> 247             setattr(self,name,value)
    248 
    249     def __setattr__(self,value):

c:\users\jason\appdata\local\programs\python\python37\lib\site-packages\bokeh\core\has_props.py in __setattr__(self,value)
    280 
    281             raise AttributeError("unexpected attribute '%s' to %s,%s attributes are %s" %
--> 282                 (name,self.__class__.__name__,text,nice_join(matches)))
    283 
    284     def __str__(self):

AttributeError: unexpected attribute 'responsive' to figure,possible attributes are above,align,aspect_ratio,aspect_scale,background,background_fill_alpha,background_fill_color,below,border_fill_alpha,border_fill_color,center,css_classes,disabled,extra_x_ranges,extra_y_ranges,frame_height,frame_width,height,height_policy,hidpi,inner_height,inner_width,js_event_callbacks,js_property_callbacks,left,lod_factor,lod_interval,lod_threshold,lod_timeout,margin,match_aspect,max_height,max_width,min_border,min_border_bottom,min_border_left,min_border_right,min_border_top,min_height,min_width,outer_height,outer_width,outline_line_alpha,outline_line_cap,outline_line_color,outline_line_dash,outline_line_dash_offset,outline_line_join,outline_line_width,output_backend,plot_height,plot_width,renderers,reset_policy,right,sizing_mode,subscribed_events,tags,title,title_location,toolbar,toolbar_location,toolbar_sticky,visible,width,width_policy,x_range,x_scale,y_range or y_scale

相关文章

功能概要:(目前已实现功能)公共展示部分:1.网站首页展示...
大体上把Python中的数据类型分为如下几类: Number(数字) ...
开发之前第一步,就是构造整个的项目结构。这就好比作一幅画...
源码编译方式安装Apache首先下载Apache源码压缩包,地址为ht...
前面说完了此项目的创建及数据模型设计的过程。如果未看过,...
python中常用的写爬虫的库有urllib2、requests,对于大多数比...