/*data.csv looks like this-
header
1,
1,
1,
*/
Table table;
table = loadTable("data.csv","header");
for(int i = 0; i < table.getRowCount();i++){
TableRow row = table.getRow(i);
int a = row.getInt(0);
println(a);
}
I know that this is a very basic misunderstanding of the data type, but I’ve spent way too long on this problem and I don’t have anyone available to ask. How would you find the sum of (a), all rows in column (0)?
I understand that the operation goes something like this:
1 = (0+1)
2 = (1+1)
3 = (2+1)
But what I really need is for the sum to be an int with a value of 3. I feel like the Table class can be really powerful, but there’s something that I’m not conceptually grasping about the data type