Model.tableinsertcolumn#

Model.tableinsertcolumn(name, data_type, column_label, string_array, column_index)#

Inserts a column of data into a table.

Parameters:
  • name (hwString) – The name of the table to update.

  • data_type (hwString) – The data type of the column. See Model.tablecreate() for valid values.

  • column_label (hwString) – The label of the column.

  • string_array (hwStringList) – The string array that contains the column data to add. The length of the list should be equal to the number of rows in the table.

  • column_index (unsigned int) – The index of the column to insert. Tables are indexed starting from 1 (1 to n columns).

Example#

Insert column 4 of type integer and label INTEGERS to “ table1 “ which has 7 rows#
import hm
import hm.entities as ent

model = hm.Model()

model.tableinsertcolumn(
name="table1",
data_type="int",
column_label="INTEGER",
string_array=["1", "2", "3", "4", "5", "6", "7"],
column_index=4,
)