1
我試圖在使用Bokeh的選項卡中顯示多個數據框。我的代碼在將我的文件保存爲html時起作用,但無法在Jupyter筆記本中內聯顯示。 這裏是我的代碼:無法在Jupyter筆記本上內聯顯示DataTable的選項卡
from bokeh.models.widgets import DataTable, DateFormatter,
TableColumn, Panel, Tabs
from bokeh.io import output_notebook, show
from bokeh.models import ColumnDataSource
from bokeh.plotting import figure
from bokeh.resources import INLINE
output_notebook(resources=INLINE)
source = ColumnDataSource(train.head())
columns = [TableColumn(field=col, title=col) for col in train.columns.tolist()]
data_table = DataTable(source=source, columns=columns, width=400, height=280)
tab1 = Panel(child=data_table, title="Train")
source = ColumnDataSource(prop.head())
columns = [TableColumn(field=col, title=col) for col in prop.columns.tolist()]
data_table = DataTable(source=source, columns=columns, width=len(columns)*100, height=280)
tab2 = Panel(child=data_table, title="Properties")
tabs = Tabs(tabs=[tab1, tab2])
show(tabs)
以下是錯誤messege:
Javascript error adding output!
Error: SlickGrid's 'enableColumnReorder = true' option requires jquery-ui.sortable module to be loaded
See your browser Javascript console for more details.
這裏是我的設置:
Python 3.6.1 :: Anaconda custom (64-bit)
Ubuntu 16.04 LTS
jupyter==1.0.0
jupyter-client==5.0.1
jupyter-console==5.1.0
jupyter-core==4.3.0
bokeh==0.12.7
有人點我一個方向我能做些什麼解決這個問題? 在此先感謝! Mike