Float and/or string formatting

Trying to format floats to the text property of a label. I am seeing examples for Python using numberFormat but this does not exist. Is there a namespace I need to import? Format example “{#,##0.00}” What is the best method to format a string or float in the script editor?

Click on the binding button next to the text property and use an expression binding, then put the following code in the expression area:

numberFormat({Path/To/Tag}, "#,##0.00")

Path/To/Tag is your tag path, obviously. And anything in the formatting that is a # is optional, places with 0’s will always be displayed.

I am not writing to the label from a tag. I am pulling the text from a column in a table via script.

On “propertyChange” of the table
table = event.source.data
event.source.parent.getComponent(‘Label1’).text = str(table.getValueAt(0, ‘Col1’))

I was trying to format when writing back to the label.

I tried as your suggestion and used the expression binding to the label:
numberFormat(toFloat({Root Container.Label1.text}), “#,##0.00”)

This worked!