IDataSeries Table.CreateAndAddColumn(VariableType variableType, VariableClassification variableClassification, IEnumerable data, String unit, String name)

Creates and adds a new column (data series) to the table. If `data` is provided, the number of rows (length of `data`) must be identical to the number of rows already in the table. If `data` is not provided, the returned series will have the same number of rows as the table with default-initialized values. If there are no rows in the table and `data` is provided, this will initialize the number of rows in the table to the length of `data`.

Parameters

  • variableType
    The of the new column.
  • variableClassification
    The of the new column.
  • data
    Type: IEnumerable
    The values, if any, for the new column. If `null`, a default value of will be used.
  • unit
    Type: String
    The unit of the data. If `null`, a default unit will be selected for the specified
  • name
    Type: String
    The name of the new column. If `null`, a unique name will be generated from the specified

Return Value

Type: IDataSeries
The corresponding to the new column.