I have a tech.tablesaw.api.Table that got filled by SQL Result Set. But I want to overwrite one of the columns with other values before running SMILE (the setValue method below doesn't exist, but I'm looking for something like that). Is the Table object readonly? Or is there a way to do this? Thanks!
for(int r=0; r < theTable.rowCount(); r++) {
theTable.row(r).column("last_name").setValue("Smith");
}
There are several ways to set values in columns. One approach is to use a Row object to iterate over the table:
On the other hand, you can update the column directly.
There are other methods that can be used to update the column conditionally, using values from the same row in another column, and so on.