Skip to content
Advertisement

Format Changing Problem of Number Input in streamlit

The program offers the number format as Default in a.b format (like 1.2) but I want to show as a:b format (like 1:2) How can I change this? I tried below but it didn’t work:

(st.number_input(“time”)).replace(".",":")

Advertisement

Answer

str(st.number_input(“time”,format="%f")).replace(".",":")
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement