1

How to use the "number_format" property in Taipy table? The documentation doesn't say anything on this subject.

I expected something like .2f to show two decimals, but whatever I write here is just reproduced as plain text in the table.

from taipy.gui import Gui 

data = {"x":[1,2,3,4],"y":[1.3355,2.674,3.4546,4.456]}

Gui('<|{data}|table|number_format=.2f|>').run()

enter image description here

Areth
  • 185
  • 5

1 Answers1

0

Try adding a '%' before '.2f'. This should be the proper syntax.

from taipy.gui import Gui 

data = {"x":[1,2,3,4],"y":[1.3355,2.674,3.4546,4.456]}

Gui('<|{data}|table|number_format=%.2f|>').run()

result

Florian Jacta
  • 1,143
  • 1
  • 2
  • 5