How does one filter the items of a dictionary based on the values therein. For instance, given the following dictionary:
990.5| 0
900.5| 0
600.5| 300
600 | -300
How does one filter out all instances therein where the value = 0. The result thereafter being:
600.5| 300
600 | -300
Thanks
The where keyword can also be used to achieve this without assignment
q)d:990.5 900.5 600.5 600!0 0 300 -300
q)where[d<>0]#d
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With