cos function in the Factory

The cos function returns the cosine of each row of the column.


Parameters

cos(column)

Parameter

Description

column

The attribute used to evaluate its cosine. Its type must be numeral. The column parameter is mandatory.


Example

The following example uses the Bike Sales dataset.

This example isn’t based on a real scenario, it only explains how to use the function.

Description

Screenshot

In this example, we want to retrieve the cosine of the Revenue attribute.

Add a new column, and type the following formula: cos($"Revenue")

As you can see, the attribute has been filled with the cosine of the Revenue column’s values.