Hello. I am trying to output table in jupyter notebook.Following is my code
df = pd.DataFrame(lst, columns=['date_','type','name','amount','id','yearmonth'])
source = ColumnDataSource(df)
columns = [
TableColumn(field="date_", title="Date", formatter=DateFormatter()),
TableColumn(field="type", title="Type"),
TableColumn(field="name", title="Name"),
TableColumn(field="amount", title="Amount")
]
data_table = DataTable(source=source, columns=columns, width=400, height=280)
show(data_table)
show(data_table) return next error:
RuntimeError: Models must be owned by only a single document, ColumnDataSource(id='1196', ...) is already in a doc
How to solve it?