Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
.[string 10#.z.d;(til 10;4 7);:;"-"]
做我想做的;它将日期列表中每个元素的字符 4 和 7 替换为“-”。
我似乎记得可以以某种方式省略顶级索引(即til 10)。我希望下面的工作,但它没有:
til 10
.[string 10#.z.d;(0N;4 7);:;"-"]
如何在点修改中省略顶级索引?
q).[string 10#.z.d;(::;4 7);:;"-"] "2014-04-22" "2014-04-22" "2014-04-22" "2014-04-22" "2014-04-22" "2014-04-22" "2014-04-22" "2014-04-22" "2014-04-22" "2014-04-22"
与索引列表时相同的行为:
q)l:1 2 3 q)l[::] 1 2 3