我想在 jsl 中创建一个函数,它将给定的列名列表作为输入,使用这些列来执行 OR 条件,并输出具有该循环 OR 公式的列。 你是怎么做到的?
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
)
));对于上面,我想做一个如下的函数:
my_func =
Function(
{input_dt, input_col_list, x},
{//local var},
// function body
...
Return As column("d")
);