Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can one drop/delete columns from a KDB table in place?

Following the documentation, I tried to do the following:

t:([]a:1 2 3;b:4 5 6;c:`d`e`f) // some input table
`a`b _ t                       // works: delete NOT in place
(enlist `a) _ t                // works: delete NOT in place
t _:`a`b                 // drop columns in place does not work; how to make it to work?
// 'type
//   [0]  t _:`a`b

Thank you very much for your help!

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You should be able to use

delete a,b from `t

to delete in place (The backtick implies in place).

Alternatively, for more flexibility you could use the functional form;

![`t;();0b;`a`b]
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading