I'd like to create a function in jsl that takes a given list of column names as input, uses those columns to do a OR condition, and outputs a column with that looping OR formula. How do U do that?
input_col_list = { "a", "b", "c"};
input_dt = dt;
x = 0.1;
input_dt << New Column("d", numeric, continuous,
formula (
If(
(As Column("a") >= x | As Column("b") >= x | As Column("c") >= x),
1,
0
)
));For above, I would like to make a function like below:
my_func =
Function(
{input_dt, input_col_list, x},
{//local var},
// function body
...
Return As column("d")
);