I have a large DataFrame that I import from a spreadsheet. I have the names of several columns that concern me in an array of rows. How to select a DataFrame column whose name matches the contents of a row? I would like something like this to work
using DataFrames df = DataFrame(A = 1:4, B = ["M", "F", "F", "M"], C = 2:5) colsICareAbout = [":B" ":C"] df[:A]
Is there any way to do this?
source share