The DataFrame type in Julia allows you to access it as an array, so it is possible to remove columns via indexing:
df = df[:,[1:2,4:end]] # remove column 3
The problem with this approach is that I often only know the column's name, not its column index in the table.
Is there a built-in way to remove a column by name?
Alternatively, is there a better way to do it than this?
colind = findfirst(names(df), colsymbol)
df = df[:,[1:colind-1,colind+1:end]]
The above is failure prone; there are a few edge-cases (single column, first column, last column, symbol not in table, etc.)
Thank you