How do I show a dataTable?


I have a callback for a data table … and don’t know how show it.

What is the component of the dataTable?

the output is this:


I did a definition for the table

def data_table(drop1,drop2,dff):
    table01 = dash_table.DataTable(

and returns


to show it here;


but doesn’t work, what do I need to change to show the table?

If your callback returns an entire datatable, you could modify the children property of a simple html.Div component.

You can also have callbacks modify components of the table like data, columns, etc.

dbc.Table is a separate component unrelated to DataTable

hi chubakov, good pr;)

you said, if the callback returns the entire datatable… can you be more explicit (don’t understand this).

still can’t manage to show the table …

from dash import Dash, dash_table
import pandas as pd

app = Dash(__name__)

df = pd.read_csv('')

def make_table():
    return dash_table.DataTable(
         columns= [{"name": i, "id": i} for i in df.columns]

app.layout = html.Div(id='table_container',children=make_table())

if __name__ == '__main__':

then you can make a callback that updates ('table_container','children') and takes inputs that you can pass to make_table

(post deleted by author)

TypeError: update_table() missing 9 required positional arguments: ‘drop1’, ‘drop2’, ‘drop3’, ‘drop4’, ‘drop5’, ‘drop6’, ‘drop7’, ‘drop8’, and ‘drop9’

what can I do with this? (its in the layout)