This reference is for Processing 3.0+. If you have a previous version, use the reference included with your software in the Help menu. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Core Javadoc and Libraries Javadoc.
Name | Table |
||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Examples | Table table; void setup() { table = new Table(); table.addColumn("id"); table.addColumn("species"); table.addColumn("name"); TableRow newRow = table.addRow(); newRow.setInt("id", table.lastRowIndex()); newRow.setString("species", "Panthera leo"); newRow.setString("name", "Lion"); saveTable(table, "data/new.csv"); } // Sketch saves the following to a file called "new.csv": // id,species,name // 0,Panthera leo,Lion | ||||||||||||||||||||||||||||||||||||||||||||||
Description |
Table objects store data with multiple rows and columns, much like in a traditional spreadsheet. Tables can be generated from scratch, dynamically, or using data from an existing file. Tables can also be output and saved to disk, as in the example above. Additional Table methods are documented in the Processing Table Javadoc. |
||||||||||||||||||||||||||||||||||||||||||||||
Methods |
| ||||||||||||||||||||||||||||||||||||||||||||||
Constructor | Table() Table(rows) | ||||||||||||||||||||||||||||||||||||||||||||||
Related | loadTable() saveTable() TableRow |
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.