Tabs or nested tabs with st.dataframe()

In an effort to clean up my reports, I’d like to be able to embed a st.dataframe() into tabs (similar to ipywidgets). At the moment, I haven’t found a solution that worked, other than maybe @Marc 's Bokeh suggestions but that requires changing it to the Bokeh formatted data tables. Would I be able to create a custom component for this? Does anyone have suggestions?

I think it’s possible to create a component for this, I saw @karriebear do something similar as a one-off test. I could imagine a function taking a list of dataframes on the Python side, rendering each into its own tab.

Yup, I created a custom component to handle it for me. I’m going to clean it up and package it up hopefully in the near future but if you’d like something in the near term, feel free to take a look at my repo. If you want to preview it, you can take a look here.

Happy to help if you run into any problems!

3 Likes

ah this is perfect! thanks @karriebear, it looks really nice

1 Like

Here’s another thread on tabs for anyone looking for updates on how to do tabs more generally: Feature request: Tabs · Issue #233 · streamlit/streamlit · GitHub