Can st.number_input( ) display more than 2 decimals?

Dear Streamliters!

I’m not totally new to Streamlit but recently started to dive in details. For one of my number input, I need to show the users number with 3 decimal places but it seems not possible. I have tried to put step as 0.001 but it is not actually displaying 3 decimals during the interaction (it rounded automatically. Any suggestions?
Thanks in advance.

input7 = st.number_input('ABC:', value=1.454, step=0.001)


Hi @Qingyao-gh , you could try the following statement:

input7 = st.number_input(‘ABC:’, value=1.454, step=0.001, format="%0.3f")


1 Like

Thanks, @Shawn_Pereira! I got it displayed in 3 decimal places directly in the number input box