✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚾️ It's finally Baseball season! Root for the home team... & Register for our Sports Analytics Webinar!

Dash - DataTable Streaming

Dear all,
I am quiet new to Dash but already amazed by it… Thanks a lot to all the team for creating that amazing tool.

I have looked into the posts but have not quiet find an answer to my problem.
Sorry in advance if my question seems stupid.
I would like to stream data into a Dash DataTable…

import dash
from dash.dependencies import Input, Output
import dash_core_components as dcc
import dash_html_components as html
import dash_table_experiments as dt
import pandas as pd
import numpy as np

app = dash.Dash()

df = pd.DataFrame(np.random.randint(0,100,size=(1, 4)), columns=list('ABCD'))

app.layout = html.Div([

    dt.DataTable(rows=df.to_dict('records'),id='mytab'),
    dcc.Interval(id='table_update', interval=1*1000,n_intervals=0)
])


@app.callback(Output('mytab', 'rows'),[Input('table_update','n_intervals')])
def update_table(interval):
    return df.to_dict('records')

app.css.append_css({
    "external_url": "https://codepen.io/chriddyp/pen/bWLwgP.css"
})

if __name__ == '__main__':
    app.run_server(debug=True)

If you can point me in the right direction, I did not get how to use json.dump() when I only want to replace rows or how to return the correct syntax when updating the content part of the Div directly…

Thanks a lot
Best Regards,