--- title: "Transforming data" slug: "transforming-data" updated: 2024-10-22T06:55:57Z published: 2024-10-22T06:55:57Z canonical: "userguide.dataclassroom.com/transforming-data" --- > ## Documentation Index > Fetch the complete documentation index at: https://userguide.dataclassroom.com/llms.txt > Use this file to discover all available pages before exploring further. # Transforming data Sometimes you have some data in a column, and you want to change it in some way. You might want to **multiply it by a number**, take a **square root** - whatever. With the column transform feature, you can apply a function to all the data in the column at once, creating either: - A new set of values in the same column - A new column to the right of the original one To do this, click the **column transform button** on the column header: ![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/image-1620803945087.png) You can then choose between **replacing the data** in this column, or **creating a new column**. Don't see the button?This is an advanced feature, and the button may not be shown. See [Customizing controls](/v1/docs/customizing-which-controls-are-shown) for how to get the button to show. You then get to specify the function, and the new column name (if relevant): ![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/image-1620804327170.png) ### Available functions Here is a list of the available transform functions. - Y represents the value in the original column - K is an optional value, required for some of the transforms. For example to convert 'Year' to 'Age' you might do **Negate (k - y)** and have a constant k = 2024. - K can also be taken from another column, so you can e.g. multiply two columns together. | Function | Description | | --- | --- | | Add (y + k) | Add a number (k) to each value (y) | | Subtract (y - k) | Subtract a number (k) from each value (y) | | Multiply (y × k) | Multiply y by k | | Divide (y ÷ k) | Divide y by k | | Negate (k - y) | Subtract k from y (If k = 0, this is inverting the sign of y) | | Invert (1 ÷ y) | Invert y | | K divided by y (k ÷ y) | Divide y into k | | Absolute value - abs(y) | Make y values always positive | | Square (y2) | Square of y | | Square root (√y ) | Square root of y | | Power (yk ) | Raise y to the power of k | | Log base 10 (log10 y ) | Base 10 logarithm of y | | Log base e (log10 y ) | Base e logarithm of y (natural logarithm) | | Exponent (ey ) | Raise e to the power y | | Round (rnd) | Round to K digits after decimal point | | Precision (prec) | Round to K significant digits of precision | | Ranking - rank(y) | Rank values in column numerically and replace with a number representing their order in the ranking. Equal values get the same ranking. | Need a function we don't support?Just let us know at [help@dataclassroom.com](mailto:help@dataclassroom.com). We add features all the time based on input from our users. ### Functions of two columns This is done by specifying **K as coming from another column**, as in this simple example: ![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/image-1729510420802.png) ### Multiple transforms You can create a sequence of transforms, if your data require this. For example, you could: - First transform the number with a multiply or divide (convert inches into metres) - Then take the square of that result (metres into square metres for area) ### Errors Some of these mathematical functions cannot handle all possible input values. For example: - You can't take the square root of a negative number - You can't take the logarithm of zero - You can't divide anything by zero (OK you can, but you get "infinity" as the result!) These errors will be flagged and you will get a warning if you are trying to apply an "impossible" transform. ### Differentiation (slopes) We don't currently have a function to differentiate column values (it's on the roadmap) but you can achieve the same (or similar) result by making a graph with a **regression line**, and then adding slope markers which give you the **slope of the line at each point**. You can then create a new column of data from these slope values. See [this article on slopes and residuals](/v1/docs/slope-of-the-line-differential) for how to do this.