# Dashtable DataTable

**URL:** <https://community.plotly.com/t/dashtable-datatable/26395>\
**Category:** Dash Python\
**Created:** [July 25, 2019, 4:46pm UTC](https://community.plotly.com/t/dashtable-datatable/26395 "2019-07-25T16:46:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sangsang](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@sangsang](https://community.plotly.com/u/sangsang)\
**Post date:** [July 25, 2019, 4:46pm UTC](https://community.plotly.com/t/dashtable-datatable/26395/1 "2019-07-25T16:46:48Z")

</div>

app.layout = dash\_table.DataTable(  
id=‘table’,  
columns=[{“name”: i, “id”: i} for i in df.columns],  
data=df.to\_dict(‘records’)

This is the code snippet from the dashtable.DataTable documentation.Can someone please explain the purpose of using df.to\_dict(‘records’).
