I would like to use the nth_value function with a nth parameter coming from an another column (see the example below).
But it fails. I don't really know if it's the expected behavior or if there's something wrong?
aq
.table({
value: [69, 108, 178, 207, 253, 268, 312, 281, 221, 142, 72, 52],
index: [3, 2, 3, 5, 6, 8, 2, 2, 7, 5, 4, 5]
})
.derive({
nth: (vv) => aq.op.nth_value(vv.value, vv.index)
})
gives an error RuntimeError: data is not defined
nth always has to be a constant?
I would like to use the
nth_valuefunction with anthparameter coming from an another column (see the example below).But it fails. I don't really know if it's the expected behavior or if there's something wrong?
gives an error
RuntimeError: data is not definednthalways has to be a constant?