我有一个 DataFrame
df = DataFrame(x = 1:3, y = 4:6)
3×2 DataFrame
Row │ x y
│ Int64 Int64
─────┼──────────────
1 │ 1 4
2 │ 2 5
3 │ 3 6
我该如何将一个列提取为 Vector
?
我知道可以使用 df[:,:x]
或 df.x
来实现,但是否有一种使用函数的方法来实现?我问这个问题是因为我正在使用 Chain.jl
包,并且想要做出类似以下操作的效果
@chain df begin
some_manipulations_here
pull(:x)
end