Data Manipulation
Explore how to manipulate tabular data within Dash DataTable by enabling sorting, filtering, row selection, editing, and styling. Understand properties such as sort_action, filter_action, and callbacks to create highly interactive and customizable data tables in your Dash applications.
We'll cover the following...
Data manipulation is a crucial skill in the world of data analysis. Typically those that work with data are used to being able to undertake sorting and filtering data to quickly get to the information they need.
Here we will explore how to do just that using Dash DataTable. It will greatly enhance the user interactivity in the app.
Sorting data
Sorting data can be done through the user interface by setting the following properties:
sort_action: This property allows us to sort the data for a particular column or set of columns. Set tononefor no sorting functionality,nativeif we want sorting functionality to appear in the display for us to use, andcustomfor more advanced use cases beyond this course’s scope. In the vast majority of use cases,sort_action='native'is a perfect solution.sort_mode: This allows users to either be on one particular column (single) or based on multiple columns simultaneously (multi).
With these properties set, each column will have an upward and downward arrow to control the order in ...