the other day I spotted an (for me) unexpected behaviour on using a standard st.dataframe().
My expected behaviour is that the dataframe would resort once you click on a column’s header.
I observed this on my mobile phone (Android but with several browsers) as well as the dev-device option of Chrome at my desktop.
Anyone else having the same issue. Any workarounds (click events…)?
thanks for having a look at it.
I can replicate this at with any streamlit app - also from the official streamlit gallery, such as the “bug-report” app.
For better illustration of the matter you can have a look at this screen recording: Link
Thanks for keeping me updated.
Jonas
NB: Tables created with streamlit-aggrid are fine.
I just tried the app you linked and could get it to misbehave as you illustrated on Chrome (dev-device Windows 10) and Android, but at the same time if I tried a different app and there was no problem with the dataframe sorting.
Linked Bug Report df doesn’t sort; other app df does sort:
I checked on the app for reference. I also get the sorting feature on mobile for it.
On my code I tried st.dataframe() as well as st.write() with no effect.
I simplified a test code as much as only having streamlit and pandas imported - same isue.
For your information, my app runs on streamlit version 1.11.0
Can you try upgrading to the latest Streamlit version? If it’s still an issue, feel free to file a bug report as a Github issue, and we’ll get an engineer from our team to look into it!
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.