Model.tableupdatecolumn#
- Model.tableupdatecolumn(name, data_flag, data_type, column_label_flag, column_label, string_array, column_index)#
Updates the values in a column of a table.
- Parameters:
name (hwString) – The name of the table to update.
data_flag (unsigned int) – A flag defining if the
data_typeand column data contained instring_arrayshould be updated (1) or ignored (0).data_type (hwString) – The data type of the column. See
Model.tablecreate()for valid values. Ignored ifdata_flag=0.column_label_flag (unsigned int) – A flag defining if the column_label should be updated (1) or ignored (0).
column_label (hwString) – The label of the column. Ignored if
column_label_flag=0.string_array (hwStringList) – The string array that contains the column data to update. The length of the list should be equal to the number of rows in the table. Ignored if
data_flag=0.column_index (unsigned int) – The index of the column to update. Tables are indexed starting from 1 (1 to n columns).
Example#
Update the data of column 3 of “ table1 “ which has 7 rows of integers , but ignore the label#import hm import hm.entities as ent model = hm.Model() model.tableupdatecolumn( name="table1", data_flag=1, data_type="int", column_label_flag=0, column_label="", string_array=["1", "2", "3", "4", "5", "6", "7"], column_index=3, )