Writing a value to a perspective table from a script

Greetings, this is probably an elementary question I should be able to answer, but how do I write a value to a perspective table using a script. For example, I want to zero out, or blank the values in a table when a button is pressed, so using a mouse click script what is the syntax for the write of values back to the table? I can read them no problem.
Thanks for any input.

This will blank out your table but I suspect there may be more to what you want to accomplish?

self.getSibling("Table").props.data = None

Use an onActionPerformed event on the button, not a click event.
Add a script there.

If your table's data property is a dataset, use dataset methods/functions:
https://docs.inductiveautomation.com/display/DOC81/system.dataset
https://docs.inductiveautomation.com/display/DOC81/Datasets#Datasets-AccessingDatainaDataset

For example, several ways of zeroing a column 'foo':

ds = path.to.table.props.data
# there might be a better way of doing this but I'm not sure
# what exactly is the type of the list returned there
headers = [col for col in ds.columnNames if col != 'foo']
type_of_foo = ds.getColumnType(ds.getColumnIndex('foo'))
foo = [0 for _ in xrange(ds.rowCount)]
ds = system.dataset.filterColumns(ds, headers)
ds = system.dataset.addColumn(ds, foo, 'foo', type_of_foo)
path.to.table.props.data = ds
ds = path.to.table.props.data
for row in xrange(ds.rowCount):
    ds = system.dataset.setValue(ds, row, 'foo', 0)
path.to.table.props.data = ds

disclaimer: I'm writing this code off the top of my head, and I'm not testing any of it.

If it's an array of objects, you can modify it in the same way you'd use a list of dicts.

Thank you, I didn't realize the table was a data set. I had a couple of people tell me that, it makes more sense now. Thank you for the help.