Exploring the limits of dataframes and tables in streamlit

I’ve started to explore the what and how of dataframes and tables in Streamlit because I need something more than just the simple st.dataframe or st.table.

I need style, layout, formatting, filtering, performance etc.

I’m experimenting and learning by creating a Table Experiments app for the awesome-streamlit.org gallery.

One thing I’ve learned is that I can in fact use the Plotly table which comes with more advanced layout and formatting options.

Another thing I’ve learned is that I cannot currently in any way use the awesome Slickgrid.

Any comments, hacks, ideas or suggestions are very much appreciated.

Feel free to contribute. It’s only a pull request away at https://github.com/marcskovmadsen/awesome-streamlit

Hey @Marc!

One thing I’ve learned is that I can in fact use the Plotly table which comes with more advanced layout and formatting options.

That’s a cool find about Plotly Table! The only issue I see is that it doesn’t use a serialization format as compact as Streamlit’s (especially given some upcoming improvements!) and doesn’t support add_rows. But for small-to-medium amounts of data that are not going to be growing over time, it’s an amazing solution! Very customizable.

I need style, layout, formatting, filtering, performance etc.

Can you go into a little more detail about what you’re looking for regarding style and layout? Also, what are the performance issues you’re encountering?

As for filtering, right now the solution is for users to implement filters using widgets. And they can even wrap the final result into their own Python modules, if they want, and distribute them in PyPI or Github!

The main limitation here is that the widgets will have to be laid out vertically, but we’re working on ways to do horizontal, grid, and tabbed layouts too. So this direction will become much more powerful at that point.

Another thing I’ve learned is that I cannot currently in any way use the awesome Slickgrid .

Yeah Slickgrid is nontrivial to support since it’s a pure JS library with no Python component. To use it in Streamlit there are two possibilities, both a little far off into the future:

  1. Wait for Streamlit plugins!
  2. Make st.dataframe use SlickGrid under the hood. In principle, we’re not against this — we’d just have to do a little research into the pros and cons of each of the main JS libraries before moving ahead. Let me know if you have any thoughts here!
1 Like