select
Builtin index · Collections & strings
result = select(df, "col", ...)
Input: df, "col", ... · Output: result
What it is
df is a Table; each remaining argument is a Str column name.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = select(df, "col", ...) | df Tabledf is a Table."col" —not documented yet... repeatablenot documented yet | result Table | Returns a Table containing only the named columns, in the order given. |
Examples
From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.
df = DataFrame(x=[1, 2, 3, 4, 5], y=[10, 20, 30, 40, 50], label="sample")
print(nrow(df)) # 5
print(ncol(df)) # 3
tall = filter(df, df.x > 2)
xy = select(tall, "x", "y")
print(xy)
print(describe(df))
output
5
3
x y
- --
3 30
4 40
5 50
stat x y
----- -------- ---------
count 5 5
mean 3 30
std 1.581139 15.811388
min 1 10
25% 2 20
... 3 more linesfrom collections-strings