I am using Bokeh 2.0.1, I want to edit the data table and use the new data from edited datatable. Is anyone can suggest how to get the new data after edit datatable ( I am pretty new to Bokeh)? Thanks!
from bokeh.models import ColumnDataSource
from bokeh.models.widgets import DataTable, TableColumn, StringEditor, IntEditor
import pandas as pd
from bokeh.io import output_notebook, show
output_notebook()
df = pd.DataFrame([[0, 1,2],[1,4,5], [0,5,6]])
df.columns = [‘x’, ‘one’, ‘two’]
cds = ColumnDataSource(df)
columns = [
TableColumn(field=“one”, title=“ONE”, editor=IntEditor()),
TableColumn(field=“two”, title=“TWO”)
]
dt = DataTable(source=cds, columns=columns,
sortable=True, editable=True, fit_columns=True, selectable=True)
show(dt)
df=dt.source.data

