using DataFrames
df = DataFrame(Firstcolumn = 1:5, Secondcolumn = 1:5)
rename!(df, ["Firstcolumn","Second-column"])
# this works just fine
df[:,:Firstcolumn]
# this does not work
df[:,:Second-column]
# also does not work :(
df[:,:(Second-column)]
# works, but I need the Symbol syntax for more complex transformation calls
df[:,"Second-column"]
Is there a way to escape the βSecond-columnβ column name? As the DataFrame has many variables I ideally want to avoid renaming the columns.
Ah right, itβs a DataFramesMeta issue - youβd have to ask @pdeffebach then
My assumption would be that strings should work in DataFramesMeta given they do in regular DataFrames and I believe the design philosophy of DataFramesMeta is to be consistent with the workings of plain DataFrames.
I did some testing and this seems to work in the same cases for which @nilshg suggested to use strings (i.e. a DataFrame transform call), but it also breaks DataFramesMeta.