-
-
-def create_data_table(df):
- """Create Dash datatable from Pandas DataFrame.
-
- DEMO
- """
-
- table = dash_table.DataTable(
- id=u"database-table",
- columns=[{u"name": i, u"id": i} for i in df.columns],
- data=df.to_dict(u"records"),
- sort_action=u"native",
- sort_mode=u"native",
- page_size=10,
- )
- return table