Pros & Cons of Dash

Great summary @HashRocketSyntax!

I’m a longtime Dash user who was sold on the super powers that Dash and other Python based data-app frameworks provide right from the get-go.

I’ll throw in my two cents around the DataTable component, having recently been working on an app that makes heavy use of it (whereas I had only experimented with it before).

I’ve also come to the same conclusion, that it still has some missing functionality and rough edges, which, in the context of a framework for building data apps, represents some considerable feature gaps, given that this component will be the workhorse of a large chunk of apps folks will be trying to use Dash to make.

I also think it’s clear that the DataTable component has had a massive amount work put into it, and it’s quite impressive what the Dash dev team have built, given that they’ve made this component entirely from scratch. I find myself comparing it to the DataTables jQuery plugin, which I’ve previously used to make record-oriented data apps and is very much a mature data table library. It’s worth bearing in mind that this project just consists of a data table and has benefited from 15 years of development, whereas the Dash DataTable is but one component in the greater Dash ecosystem that the Dash dev team maintains, and has only existed for a couple of years.

Here’s the notable friction points in the DataTable component that I’ve run into, which I think could be opportunities for the DataTable to become a mature tabular data explorer:

  • There’s limited support for number formatting via d3-format, however the DataTable does not expose the ability to decouple cell rendering from underlying cell values. A notable effect of this limitation is that when using Markdown rendering in cells, client-side filtering is performed on the Markdown text rather than the underlying values that would have been used to generate the Markdown, which will likely break filtering functionality (as @stu mentioned). Also when exporting the table data as eg CSV, users will get markdown strings in their export rather than raw data.
  • There’s no context displayed regarding the record numbers for the current page and total number of records after any client-side filtering is performed. eg: “showing 1-20 of 347 records”. This is important context for someone working their way through more than a small number of records. I was able to get this partially implemented using a client-side callback, but this seems like a low-hanging accessibility improvement that could come out of the box.
  • Lack of customisability over location of table controls like pagination and visible columns. In my app, which has a large scrolling table, it would be more accessible to have the pagination controls at the top of the table (or preferably both at the top and bottom).
  • The client-side filtering ability is great, but requiring the user to learn the required querying language is not super accessible. I’m hoping that the DataTable roadmap includes adding UI components for each filter type to make these more accessible and ergonomic. A massive game changer would be a dropdown column filter pre-populated with all distinct values in that column (see here for an example). As this would be in instant data exploration capability uplift, helping you learn about your data as you filter.
  • There’s no simple mechanism to add an index column that just shows the rank of each row in the DataTable. I had to get around this by adding this column in the underlying DataFrame, but this has the limitation that the numbering won’t be re-indexed after client-side filtering, so you’ll see row numbers like 1,8,9,20,21 etc
  • It feels like the DataTable has been developed with a bias towards cell_selectable=True. After disabling this, I discovered some quirks/bugs. Notably, copy paste for cell values is broken and separate to that, selecting cell contents with the cursor appears broken to the user due to some CSS weirdness.

And just to reiterate, these are all things I think are opportunities to build on the already amazing work that’s been done on the DataTable component!

2 Likes