# Dash DataTable - Using Callbacks

**URL:** https://community.plotly.com/t/dash-datatable-using-callbacks/6756
**Category:** Dash Python
**Created:** [November 11, 2017, 7:00pm UTC](https://community.plotly.com/t/dash-datatable-using-callbacks/6756 "2017-11-11T19:00:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![benjaminbiegel](https://avatars.discourse-cdn.com/v4/letter/b/eada6e/32.png) [@benjaminbiegel](https://community.plotly.com/u/benjaminbiegel)
#### Post date: [November 11, 2017, 7:00pm UTC](https://community.plotly.com/t/dash-datatable-using-callbacks/6756/1 "2017-11-11T19:00:40Z")

</div>

How do you use dash-table-experiments together with callback functions?

The code below works for the table without callback, but when I included the call back functionality it does not work, (I get a “Error loading dependencies error”).

import dash  
from dash.dependencies import Input, Output  
import dash\_html\_components as html  
import dash\_table\_experiments as dt  
import pandas

app = dash.Dash()

DF\_SIMPLE = pandas.DataFrame({  
‘x’: [‘A’, ‘B’, ‘C’, ‘D’, ‘E’, ‘F’],  
‘y’: [4, 3, 1, 2, 3, 6],  
‘z’: [‘a’, ‘b’, ‘c’, ‘a’, ‘b’, ‘c’]  
}).to\_dict(‘records’)

app.layout = html.Div(  
[  
dt.DataTable(  
rows=DF\_SIMPLE,  
id=‘datatable-working’  
),  
dt.DataTable(id=‘datatable-not-working’)  
]  
)

@app.callback(Output(‘datatable-not-working’, ‘rows’))  
def update\_info\_table():  
return DF\_SIMPLE

if **name** == ‘ **main** ’:  
app.run\_server()

---

<div class="post-metadata">

### Author: ![nedned](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/nedned/32/8795_2.png) [@nedned](https://community.plotly.com/u/nedned)
#### Post date: [November 12, 2017, 1:50pm UTC](https://community.plotly.com/t/dash-datatable-using-callbacks/6756/2 "2017-11-12T13:50:42Z")

</div>

I think DataTable is unhappy with rows not having an initial value. `dt.DataTable(id=‘datatable-not-working’, rows=[{}])` makes it happy.

---

<div class="post-metadata">

### Author: ![benjaminbiegel](https://avatars.discourse-cdn.com/v4/letter/b/eada6e/32.png) [@benjaminbiegel](https://community.plotly.com/u/benjaminbiegel)
#### Post date: [November 13, 2017, 10:18pm UTC](https://community.plotly.com/t/dash-datatable-using-callbacks/6756/3 "2017-11-13T22:18:29Z")

</div>

That totally worked. Thanks! 😃
