I have a function that returns a mixed list. This list has generic nulls which I am looking to remove as I am not able to raze and eventually get a table.
q)sample
::
::
(+(,`hostName)!,,`hostName1)!+(,`topCpu)!,,0f
::
(+(,`hostName)!,,`hostName2)!+(,`topCpu)!,,0f
(+(,`hostName)!,,`hostName3)!+(,`topCpu)!,,0f
(+(,`hostName)!,,`hostName4)!+(,`topCpu)!,,0f
::
::
::
I tried using except keyword but that didn't help either
q)sample except ::
k){x@&~x in y}[(::;::;(+(,`hostName)!,,`hostName1)!+(,`topCpu)!,,0f;::;(+(,`hostName)!,,`hostName2)!+(,`topCpu)!,,0f;(+(,`hostName)!,,`hostName3)!+(,`topCpu)!,,0f;(+(,`hostName)!,,`hostName4)!+(,`topCpu)!,,0f;::;::;::;
Is there any effective way of removing these?
Thanks!
You need brackets, otherwise the trailing
::makes a composition out of the statement