Processing, 类Table中的removeColumn()用法介绍。
用法
.removeColumn(columnName).removeColumn(column)
参数
columnName(String)要删除的列的标题column(int)要删除的列的索引号
返回
void
说明
使用 removeColumn() 从 Table 对象中删除现有列。要删除的列可以通过其标题(String)或其索引值(int)来标识。 removeColumn(0) 将删除第一列,removeColumn(1) 将删除第二列,依此类推。
例子
Table table;
void setup() {
table = new Table();
table.addColumn("id");
table.addColumn("species");
table.addColumn("name");
println(table.getColumnCount()); //Prints 3
table.removeColumn("id"); //Reference by title
println(table.getColumnCount()); //Prints 2
}
Table table;
void setup() {
table = new Table();
table.addColumn("id");
table.addColumn("species");
table.addColumn("name");
println(table.getColumnCount()); //Prints 3
table.removeColumn(0); //Reference by ID
println(table.getColumnCount()); //Prints 2
}
相关用法
- Processing Table.removeTokens()用法及代码示例
- Processing Table.removeRow()用法及代码示例
- Processing Table.rows()用法及代码示例
- Processing Table.matchRow()用法及代码示例
- Processing Table.findRow()用法及代码示例
- Processing Table.getInt()用法及代码示例
- Processing Table.setString()用法及代码示例
- Processing Table.setFloat()用法及代码示例
- Processing Table.findRows()用法及代码示例
- Processing Table.clearRows()用法及代码示例
- Processing Table.getFloat()用法及代码示例
- Processing Table.addColumn()用法及代码示例
- Processing Table.getColumnCount()用法及代码示例
- Processing Table.getRowCount()用法及代码示例
- Processing Table.getString()用法及代码示例
- Processing Table.getRow()用法及代码示例
- Processing Table.setInt()用法及代码示例
- Processing Table.getStringColumn()用法及代码示例
- Processing Table.matchRows()用法及代码示例
- Processing Table.addRow()用法及代码示例
- Processing TableRow.setFloat()用法及代码示例
- Processing Table用法及代码示例
- Processing TableRow.setString()用法及代码示例
- Processing TableRow.getInt()用法及代码示例
- Processing TableRow.getString()用法及代码示例
注:本文由纯净天空筛选整理自processing.org大神的英文原创作品 Table.removeColumn()。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
