Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Apply functions to elements of specific columns in rectangular data
ResourceFunction["MapAtColumns"][f,tab] applies function f to the elements all column in Tabular data tab. | |
ResourceFunction["MapAtColumns"][{col1→f1,…}, tab] applies different functions to different columns. | |
ResourceFunction["MapAtColumns"][rules] represents an operator form that can be applied to Tabular data. |
Round up the values in all columns:
| In[1]:= |
| Out[1]= | ![]() |
| In[2]:= |
| Out[2]= | ![]() |
Round up only a specific column:
| In[3]:= |
| Out[3]= | ![]() |
Apply different functions to different columns:
| In[4]:= |
| Out[4]= | ![]() |
Use MapAtColumns as an operator:
| In[5]:= | ![]() |
| Out[6]= | ![]() |
Use ColumnwiseValue to subtract the Mean from a columns:
| In[7]:= | ![]() |
| Out[8]= | ![]() |
| In[9]:= |
| Out[9]= | ![]() |
Accumulate a column:
| In[10]:= | ![]() |
| Out[11]= | ![]() |
Accumulate multiple columns:
| In[12]:= |
| Out[12]= | ![]() |
Start with a tabular object:
| In[13]:= | ![]() |
MapAtColumns works with other column-based data as well:
| In[14]:= |
| Out[14]= |
| In[15]:= |
| Out[15]= | ![]() |
MapAtColumns takes functions that do not refer to column names:
| In[16]:= | ![]() |
| Out[17]= | ![]() |
TransformColumns can do the same thing, but needs a function that explicitly refers to the source column of the data:
| In[18]:= |
| Out[18]= | ![]() |
Wolfram Language 14.0 (January 2024) or above
This work is licensed under a Creative Commons Attribution 4.0 International License