You can do one of the the following:
julia> 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
julia> @chain df begin
_.x
end
3-element Vector{Int64}:
1
2
3
julia> @chain df begin
getproperty(:x) # same as above
end
3-element Vector{Int64}:
1
2
3
julia> @chain df begin
getindex(!, :x) # also _[!, :x]
end
3-element Vector{Int64}:
1
2
3
julia> @chain df begin
getindex(:, :x) # also _[:, :x]
end
3-element Vector{Int64}:
1
2
3
Probably the first option (with is the simplest in practice._.x
I have shown the other options to highlight that all special syntaxes like or df.x are actually function calls, and the special syntax is just a convenience.df[!, :x]