Home › Forums › kdb+ › How to remove or add items from a list › Re: How to remove or add items from a list
-
You can use the drop (_) operator, where n is a number to drop.
n_list
To remove from the end of the list:
-n_list neg[n]_list
If you want to remove nulls, you can do something like:
list except 0N
You can use the drop with each (‘) operator to remove the same numbers of items from each list of different length, i.e.
n_'(ls;ls2) -n_'(ls;ls2) neg[n]_'(ls;ls2)
Or removing nulls from them
(ls;ls2)except'0N