I just started playing with the DataTable in bokeh. Very cool!
One thing I found that didn’t work or I didn’t know how to do was trying to display dates. A simple example is below. I looked for a DateFormatter but didn’t see one in widgets although I saw various other Date related classes.
from bokeh import plotting
from bokeh import models
from bokeh.models import widgets
import pandas, datetime
df = pandas.DataFrame(dict(Date = [datetime.date(2014, 1,1), datetime.date(2014, 1,2), datetime.date(2014, 1,3)], Value = [1,2,3]))
source = models.ColumnDataSource(df)
columns = [
widgets.TableColumn(field=c, title=c) for c in df.columns
data_table = widgets.DataTable(source=source, columns=columns, editable=True, width = 500)