Hello, I am trying to show a dataframe in a decent format, but the unsafe_allow_html option in the st.write function is disabled, hence I am not able to render a proper dataframe in streamlit for snowflake.
Column configs is not available neither, for the moment.
Is there a workaround to allow styling/formatting dataframes? It’s an essential component of streamlit.
Thanks for the suggestion @dataprofessor . The real problem is that some tables really need the multilevel feature for the columns to show data in the proper way, and it’s not supported by st.dataframe (hence is not only applying formatting). to_html allows to show the table in a way that makes the data shown much clearer.
Could html be rendered without allow_unsafe_html=True? It’s really simple html code… that coming from a dataframe.to_html. Or maybe is there other way to achieve the same?
Thanks for the suggestion, @dataprofessor . In fact I tried already, but the rendering with this function looks pretty bad even with style applied… so bad that I don’t think I can make it public.
I removed the multilevel columns and used st.dataframe, but so much is list by not having that multiindex that it’s a pity.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.