Creating a DataTable

Learn how to create DataTables using Plotly Express.

Now we’ll turn to explore another interactive component that is available in Dash, the DataTable.


Technically, dash_table is a separate package, as mentioned at the beginning of the section, and can be installed separately. The correct, up-to-date version is installed automatically with Dash, which is the recommended approach.

Many times, displaying tables, especially if they are interactive, can add a lot of value to users of our dashboards. Also, if our dashboards or data visualizations are not sufficient for users, or if they want to run their own analysis, it’s probably a good idea to allow them to get the raw data for that. Finally, the DataTable component allows its own data visualization through custom coloring, fonts, sizes, and so on. So, we have another way to visualize and understand our data through tables. We’ll explore a few options in this chapter, but definitely not all of them.

Adding a simple DataTable to a Dash application

Let’s see how we can create a simple DataTable in a simple app using a DataFrame.

Get hands-on with 1200+ tech skills courses.