I have a 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
How can I extract one of the columns as a Vector
?
I know I can do df[:,:x]
or df.x
, but is there a way to do it with a function instead? The reason I am asking is that I work with the Chain.jl
package and would like to do something like
@chain df begin
some_manipulations_here
pull(:x)
end