Rename table columns
x xcol y xcol[x;y]
Where y is a table, passed by value, and x is
count cols y returns y with
its first count x columns renamed
y, returns y with columns renamed according to the dictionary
q)\l trade.q
q)cols trade
`time`sym`price`size
q)`Time`Symbol xcol trade / rename first two columns
Time Symbol price size
------------------------------
09:30:00.000 a 10.75 100
q)trade:`Time`Symbol`Price`Size xcol trade / rename all and assign
q)cols trade
`Time`Symbol`Price`Size
q)cols(`a`c!`A`C)xcol([]a:();b:();c:()) / selected columns
A b C
-----