How to format selectbox for %

Trying to format values for this select box as β€œ%f%”, e.g. 5%

st.sidebar.slider("select box", min_value=0, max_value=5, format="0:.0%")

but get this error: SyntaxError: [sprintf] unexpected placeholder

I also tried format=β€œ%f%”

how can I format these ints so that they just have a β€˜%’ after them?

Figured it out. To get a β€˜%’ you need to do β€˜%%’

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.