WOLFRAM

denotes that cbody, a part of the body of a function, will be evaluated once in columnwise form before using that function to transform rows in TransformColumns or ConstructColumns operations.

Details

  • ColumnwiseValue is typically used as part of the Function body of the transformations performed on tabular data, to precompute some partial results.
  • When transforming a Tabular object tab with Function[head[,ColumnwiseValue[cbody],]], any instances of #col in cbody will be replaced with the entire column tab[[All,col]] and then evaluated to get the value cval. The transformation function becomes Function[head[,cval,]].

Examples

open allclose all

Basic Examples  (1)Summary of the most common use cases

Compute the mean of a column and subtract it from all the entries of that column:

Out[1]=1
Out[2]=2

Scope  (2)Survey of the scope of standard use cases

Use ColumnwiseValue to subtract the mean of a column from its values:

Out[1]=1
Out[2]=2

This is equivalent to first computing the mean value once and then subtracting it in every row:

Out[3]=3
Out[4]=4

Find which elements in a column are above the median:

Out[1]=1

Include a constant column with the median value:

Out[2]=2

Compute the median only once by using the operator form:

Out[3]=3

Applications  (1)Sample problems that can be solved with this function

Take a Tabular object of numbers:

Out[1]=1

Standardize the "obs" column by acting on the column as a whole:

Out[2]=2

Properties & Relations  (2)Properties of the function, and connections to other functions

Use ColumnwiseThread to compute a vector-valued transformation of an entire column:

Out[2]=2

With ColumnwiseValue, you get the same list for each row:

Out[3]=3

Take a Tabular object:

Out[1]=1

TransformColumns by default operates sequentially on each row:

Out[2]=2

TransformColumns with ColumnwiseValue[expr] evaluates expr once first, then acts on each row:

Out[3]=3

TransformColumns with ColumnwiseThread[expr] evaluates expr once, acting on whole columns:

Out[4]=4
Wolfram Research (2025), ColumnwiseValue, Wolfram Language function, https://reference.wolfram.com/language/ref/ColumnwiseValue.html.
Wolfram Research (2025), ColumnwiseValue, Wolfram Language function, https://reference.wolfram.com/language/ref/ColumnwiseValue.html.

Text

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

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

CMS

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

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

APA

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

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

BibTeX

@misc{reference.wolfram_2025_columnwisevalue, author="Wolfram Research", title="{ColumnwiseValue}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/ColumnwiseValue.html}", note=[Accessed: 19-June-2025 ]}

@misc{reference.wolfram_2025_columnwisevalue, author="Wolfram Research", title="{ColumnwiseValue}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/ColumnwiseValue.html}", note=[Accessed: 19-June-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_columnwisevalue, organization={Wolfram Research}, title={ColumnwiseValue}, year={2025}, url={https://reference.wolfram.com/language/ref/ColumnwiseValue.html}, note=[Accessed: 19-June-2025 ]}

@online{reference.wolfram_2025_columnwisevalue, organization={Wolfram Research}, title={ColumnwiseValue}, year={2025}, url={https://reference.wolfram.com/language/ref/ColumnwiseValue.html}, note=[Accessed: 19-June-2025 ]}