TabularColumn

TabularColumn[{v1,v2,}]

gives a vector with elements with values vi with an efficient element type determined automatically.

TabularColumn[{},etype]

uses element type etype.

TabularColumn[{},etype,method]

uses method to convert elements to etype.

Details

  • TabularColumn is typically used to represent a column in a Tabular object and have efficient representation of different types of data.
  • In addition to native types supported by Typed, possible element types include:
  • "MachineInteger"machine-sized integers
    "MachineReal"machine-sized reals
    "Boolean"Boolean (True or False)
    "ByteArray"ByteArray elements representing binary data
    "Categorical"::[categories]encoded by categories
    "CategoricalOrdered"::[categories]ordinal categories (with order)
    "Date"::[]calendar date of any granularity (day, month, μs, etc.)
    "Entity"::[]entity of a given domain
    "InertExpression"general expressions that do not get evaluated until used
    "ListVector"::[type]list of elements of the given type
    "ListVector"::[type,n]list length n of elements of the given type
    "ListTuple"::[type1,type2,]list of elements of types type1, type2,
    "Null"Missing expression
    "Quantity"::[type,unit]quantities of type magnitude and common unit
    "String"strings
    "Time"::[]time of day, as in TimeObject
  • More specific types for numerical elements include:
  • "Integer8"signed 8-bit integers from through 127
    "UnsignedInteger8"integers 0 through 255
    "Integer16"signed 16-bit integers from through
    "UnsignedInteger16"integers 0 through 65535
    "Integer32"signed 32-bit integers from through
    "UnsignedInteger32"integers 0 through
    "Integer64"signed 64-bit integers from through
    "UnsignedInteger64"integers 0 through
    "Real32"single-precision real (32-bit)
    "Real64"double-precision real (64-bit)
    "ComplexReal32"single-precision complex
    "ComplexReal64"double-precision complex
  • A TabularColumn object has a Boolean validity bitmap. Any element where the bitmap is not set is considered to be missing or have exceptional values.
  • In TabularColumn[,etype,method], the method argument is an association with possible keys including:
  • "AddCategories"Falsewhether to automatically categorize the data
    "ConversionMethod"Automaticconversion method for numeric data
    "MaxCategories"Infinitymaximum allowed number of categories
    "MaxMissingCases"1maximum number of supported missing cases
    "MissingValuePattern"_Missingpattern matched by missing cases
    "Validity"Allvalidity bit vector of the data or All
  • Possible values of numeric conversion method include:
  • Automaticautomatic conversion method
    "Check"checks values to be compatible with type
    "Coerce"coerces to type
    "Round"rounds reals to integers
    "ClipAndCheck"clips to the range and checks for compatible type
    "ClipAndCoerce"clips to the range and coerces to type
    "ClipAndRound"clips to the range and rounds reals to integers
  • TabularColumn conversions include:
  • Normal[TabularColumn[]]convert to an ordinary List vector
    TabularColumn[TabularColumn[],totype]convert to a tabular column with element type totype
    TabularColumn[TabularColumn[],"Categorical"]represent the data with unordered categories
  • TabularColumn[...][prop] gives the property prop of the TabularColumn object. The following properties may be given:
  • "ElementType"element type
    "Validity"validity bitmap
    "MissingCount"the number of missing or exceptional values
    "MissingProxy"type-dependent default value for storing missing entries »
    "MissingPositions"locations of the missing entries
    "Categories"list of categories if present

Examples

open allclose all

Basic Examples  (3)

A TabularColumn object of integers:

Its elements are stored as integers of 64 bits:

Store strings in a TabularColumn object:

Convert back to a list of strings:

Store a list of numbers using 16-bit integers, rounding them if needed:

Scope  (20)

Input Data  (5)

Construct a TabularColumn object from a list of integers:

Construct a TabularColumn object from a NumericArray object, preserving the numeric type:

Construct a TabularColumn object from a ByteArray object:

Construct a TabularColumn object from a QuantityArray vector, preserving the quantity units:

Construct a TabularColumn object from a SparseArray vector:

Element Types  (3)

TabularColumn[data] automatically chooses the element type used to store the data:

Specify the element type used to store the data:

TabularColumn objects can be empty, but they still have a definite type:

Missing Data  (5)

TabularColumn natively stores Missing[] objects, without affecting type detection:

By default, more than one Missing[] entries are converted to Missing["NotAvailable"]:

Extend the number of different Missing[] values supported:

Include as exceptional other types of values, not only Missing[]:

Use "MaxMissingCases"0 to convert all missing elements to Missing["NotAvailable"]:

Take a TabularColumn object with Missing[] values:

Count how many invalid elements there are:

Get a bit vector reporting validity of respective elements:

Report the indices of the invalid elements:

Internally, the invalid values are replaced by a value of the overall element type, in this case an integer:

Type Conversion  (3)

Convert a TabularColumn object of integers into reals:

Convert a TabularColumn object of integers into "String" type:

Convert a TabularColumn object of reals into "String" type:

Properties of TabularColumn Objects  (2)

Extract properties:

The default value used for storing the missing entries depends on the type of the data:

The missing proxy is used for effective storage only:

Missing proxy for other types:

Tabular Construction  (2)

Construct a Tabular object from a list of TabularColumn vectors of the same length:

Insert a typed column in a Tabular object:

Properties & Relations  (6)

Take a data vector of strings:

Compute its length:

A data vector of strings has a single dimension:

Check it satisfies VectorQ:

Use Normal to convert a TabularColumn object into a list of elements:

Take a long list of strings and store it in a TabularColumn object:

The information is the same, but it is stored in a more efficient way:

Extract elements from the TabularColumn object:

TabularColumn objects can be empty, with default element type then being "Null":

Use TabularColumnQ to validate TabularColumn objects:

Wolfram Research (2025), TabularColumn, Wolfram Language function, https://reference.wolfram.com/language/ref/TabularColumn.html.

Text

Wolfram Research (2025), TabularColumn, Wolfram Language function, https://reference.wolfram.com/language/ref/TabularColumn.html.

CMS

Wolfram Language. 2025. "TabularColumn." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TabularColumn.html.

APA

Wolfram Language. (2025). TabularColumn. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TabularColumn.html

BibTeX

@misc{reference.wolfram_2024_tabularcolumn, author="Wolfram Research", title="{TabularColumn}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/TabularColumn.html}", note=[Accessed: 15-January-2025 ]}

BibLaTeX

@online{reference.wolfram_2024_tabularcolumn, organization={Wolfram Research}, title={TabularColumn}, year={2025}, url={https://reference.wolfram.com/language/ref/TabularColumn.html}, note=[Accessed: 15-January-2025 ]}