This is about streamlit number input and its UI

Number input component when rederd.
I set number_input min_value = 1 and max_value = 99.
I also set SQLit3 columns type REAL (4,2) total 4 characters including 2 decimal point.
But when i enter my data and show table its show two number and four decimal points like 10.0000,
i want to show like 10.00.
what is the solution ?

@Tariq_Aziz

Possible solutions:

  • You could use Pythonโ€™s round off functionality to round the decimal position according to your needs.
  • Else you can use the streamlitโ€™s number_input feature to handle the value range.

But as far as your situation is concerned itโ€™s better to go with the first way as precision would vary every time.

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