Hi all,
I’m trying to get a dash table to provide an output with a simple code example below, when running this I don’t see an output dspite it being very similar to examples online.
Can anyone think of a reason as to why either this code is wrong or that the table is not showing up when running.
import pandas as pd
import dash
from dash import html
from dash import dash_table as dt
df = pd.DataFrame({"A": [1,2,3,4], "B": ['a', 'b', 'c', 'd']})
print(df)
app = dash.Dash()
app.layout = html.Div(dt.DataTable(id = 'table', data = df.to_dict('rows'), columns = df.columns))
if __name__ == '__main__':
app.run_server()
Thanks!