How to get the data of the selected rows of dash-table-experiments?

You’ll need to use the rows property as input along with selected_row_indices. There’s an example at https://github.com/plotly/dash-table-experiments. But essentially something like

@app.callback(
    Output('div-out','children'),
    [Input('datatable', 'rows'),
     Input('datatable', 'selected_row_indices')])
def f(rows,selected_row_indices):
    #either:
    selected_rows=[rows[i] for i in selected_row_indices]
    #or
    selected_rows=pd.DataFrame(rows).iloc[i] 
    return do_something
2 Likes