ColumnwiseThread
ColumnwiseThread[cbody]
denotes that cbody, a part of the body of a function, will be evaluated in columnwise form when using that function in TransformColumns or ConstructColumns operations.
Details
- ColumnwiseThread is typically used as part of the Function body of the transformations performed on tabular data, to transform columnar data at once instead of row by row.
- When transforming a Tabular object tab with Function[head[…,ColumnwiseThread[cbody],…]], cbody will be evaluated after replacing any instances of #col with the entire column tab[[All,col]]. If the result is another column of the same length, its values will be respectively used when the transformation acts row by row.
Examples
open allclose allBasic Examples (2)
Accumulate a column of a Tabular object and append the result as a new column:
Staring with a column, compute a new one by subtracting its reverse:
Scope (1)
Use ColumnwiseThread to append a new column with standardized values of another column:
Properties & Relations (2)
Use ColumnwiseThread to compute a vector-valued transformation of an entire column:
With ColumnwiseValue, you get the same list for each row:
Take a Tabular object:
TransformColumns by default operates sequentially on each row:
TransformColumns with ColumnwiseValue[expr] evaluates expr once first, then acts on each row:
TransformColumns with ColumnwiseThread[expr] evaluates expr once, acting on whole columns:
Text
Wolfram Research (2025), ColumnwiseThread, Wolfram Language function, https://reference.wolfram.com/language/ref/ColumnwiseThread.html.
CMS
Wolfram Language. 2025. "ColumnwiseThread." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ColumnwiseThread.html.
APA
Wolfram Language. (2025). ColumnwiseThread. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ColumnwiseThread.html