arrayVector数据过滤

想請教一下,在arrayvector中如何移除指定數值

请先 登录 后评论

1 个回答

wfHuang

可以使用 each + lambda表达式过滤


n=200
syms="A"+string(1..30)
datetimes=take(2019.01.01T00:00:00..2019.01.31T23:59:59, n)
bid1 = take(100+rand(20,3), n)
bid2 = take(100+rand(20,3), n)
bid3 = take(100+rand(20,3), n)
t=table(datetimes as trade_time, fixedLengthArrayVector(bid1,bid2, bid3) as bid, take(syms, n) as sym)
select trade_time, sym, each(x -> x[x>110], bid)  as bid from t

attachments-2023-06-GQ9wMCpR6498edab09969.png


请先 登录 后评论