Skip to main content

Column.from_vector

Column.from_vectorname items value_type

Group: Input

Documentation

Creates a new column given a name and a vector of elements.

Arguments

  • name: The name of the column to create.
  • items: The elements to contain in the column.
  • value_type: The type of the values in the column. If Auto, the type will be inferred from the items in the column.

Examples

Create a new column called "My Column" from a vector of numbers.

      from Standard.Table import Column

example_from_vector =
Column.from_vector "My Column" [1, 2, 3, 4, 5]

Errors

  • If some values in items do not match the value_type, an Invalid_Value_Type error is raised.
  • With the default value_type of Auto, no errors should occur.