keys

Syntax

keys(X)

Arguments

X is a dictionary/table/set.

Details

Return the keys of a dictionary as a vector, or return the column names of a table as a vector, or convert a set into a vector.

Examples

z=dict(`INT,`DOUBLE)
z[5]=7.9
z[3]=6
z.keys();
// output
[3,5]

t = table(1 2 3 as id, 4 5 6 as x, `IBM`MSFT`GOOG as name);
keys(t);
// output
["id","x","name"]

a=set(1 2 4)
a.keys();
// output
[4,2,1]

Related function: values