Collapsible/Expandable Tables

Hi. I’m trying to build an app where a multi-indexed dataframe is shown. Ideally I’d like to see the table collapsed to the first level of index vs. columns after each time page is initialized (with each row being the sum of group), but leaving the feature of clicking on each index to expand the detailed rows to the user. I know it can be down using other solutions but I reeeeeally love Streamlit and in fact, I want to stick to this framework for this app of mine.

Any ideas? :alien:

1 Like

Hi @allenfrostline and welcome to the forum :wave:

Unfortunately, right now that’s not supported in Streamlit.

However, one of our major goals for 2020 is Streamlit plugin system which will give you the ability to write arbitrary JavaScript code and insert it into your app. This opens the door for a lot of possibilities for custom solutions to layout, visualization, interactivity with chart/maps/tables, and other unique needs of your app. You can help design this feature or follow its progress over there https://github.com/streamlit/streamlit/issues/327.

And thanks for using Streamlit!

Got it. Thanks @kantuni and looking forward to the new release!

1 Like