I have created website using Bokeh. My website shows table. I am looking for help on filtering df(Pandas dataframe) based on "Date" criteria. User need to input "from" date and "to" date. and then output table should show up on website.
It seems I need help on creating customJS or any callback function. can someone please help me here?
Need two input boxes to enter "from" date and "to" date and link to table. So that whenever date changes, table should show that particular range dataframe only. Can someone please help me here?
df.head()
Source = ColumnDataSource(df2.sort_index(ascending=False) )
Columns = [ TableColumn(field=f, title=f, formatter=date, width=75) for f in date_col]+\
[ TableColumn(field=f, title=f, formatter=formater,width=75) for f in ['Benchmark']]+\
[ TableColumn(field=f, title=f, formatter=formater, width=75) for f in ['Quality']]+\
[ TableColumn(field=f, title=f, formatter=formater, width=75) for f in ['Value']]+\
[ TableColumn(field=f, title=f, formatter=formater, width=75) for f in ['Momentum']]+\
[ TableColumn(field=f, title=f, formatter=formater, width=75) for f in ['Low_Volatility']]
table1 = DataTable(source = Source, columns = Columns, width = 600, height = 1000, css_classes = ['my_class'])
select = Select(title="Indices_List:", value="ACWI", options=["ACWI",
"World", "EM", "EAFE","US", "Canada","Poland"], width= 20)
tab = Panel(child=column(select, table1), title="Universal Table")
tabs = Tabs(tabs=[tab,])
output_notebook()
show(tabs)