Hi ,I’m running my app locally but st.column_config.NumberColumn(format = 'localized") does not seem to be working as I expected. I expect the result of this minimal example:
# Set the locale for the number format NL
locale.setlocale(locale.LC_ALL, 'nl_NL.utf8')
# Create a title for your app
st.title('Minimal Work Example')
st.data_editor(
data=pd.DataFrame({"A": [123994, 23445, 345446]}),
key='data_editor',
column_config={
"A": st.column_config.NumberColumn(format="localized")
}
)
To show a thousand seperator as a . and the comma as a , but instead it does not do that while when I print a number using this locale setting it does.
Streamlit version 1.43.2
Thanks for all the help in advance! I really need to tackle this issue before being able to make a streamlit app in production in the Netherlands since it can get very confusing for big numbers.
I think they just called localized to formatting the number with a period as a decimal separator and a comma for the thousands, I do not think the app is actually aware of the users’ locale.
Though I might be missing something, this exact issue was raised here and it was closed with the 1.43 release.
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.