I’ve created the following dataset:
d = DataFrame(x=randn(100))
d[Symbol("Y 2")] = randn(100)
I can rename the second column via
rename!(d, Symbol("Y 2") => :Y)
But I would like to rename it via a DataFramesMeta
chain.
I can do
@linq d |> select(X=:x)
But
@linq d |> select(Y=Symbol("Y 2"))
drops the column Y 2
and adds the column Y
with only one row with the value “Y 2”
Additionally,
@linq d |> select(X=Symbol("x"))
Does something similar. Anyway to get around this, or do I need to use rename!
?