我似乎在Bokeh回调中遇到了与Pandas代码有关的问题。
这是错误之前输出的一部分。我的数据框看起来很正常,我不确定为什么会不高兴
time temperature
0 2016-03-17 11:00:00 4.676
1 2016-03-17 11:30:00 4.633
2 2016-03-17 12:00:00 4.639
3 2016-03-17 12:30:00 4.603
4 2016-03-17 13:00:00 4.615
5 2016-03-17 13:30:00 4.650
6 2016-03-17 14:00:00 4.678
7 2016-03-17 14:30:00 4.698
8 2016-03-17 15:00:00 4.753
9 2016-03-17 15:30:00 4.847
ERROR:bokeh.server.protocol_handler:error handling message Message 'PATCH-DOC' (
revision 1): ValueError('window must be an integer',)
Run Code Online (Sandbox Code Playgroud)
这是我从flask embed示例更改的代码(此处链接):
def callback(attr, old, new):
df = pd.DataFrame.from_dict(source.data.copy())
print df[:10]
if new == 0:
data = df
else:
data = …Run Code Online (Sandbox Code Playgroud)