and so on. But I can’t access the columns, because the keys want to have a single-quote in them, but a single-quote is an invalid literal in a key name.
julia> data[:col1]
ERROR: KeyError: key :col1 not found
julia> data[:'col1']
ERROR: syntax: invalid character literal
Escaping the single-quote with a “\” also doesn’t work. What’s the magic incantation here?
you could specify ' as the quotechar when reading, this would have the effect of removing the quotes when parsing, you would do this like CSV.read(file; quotechar="'")
If you want to keep the single quotes for whatever reason, the right way to access the columns in the DataFrame is data[Symbol("'col1'")]
Oops, my bad, the 1st option should be CSV.read(file; quotechar='\''). Not sure what’s going on with the 2nd case. Can you post the output of propertynames(data)?
Glad the quotechar option worked. As for the DataFrame indexing, you can always do data[x] where x is one of the symbols in propertynames(data), so it looks like in your case, the full column name was 'col1', with a single space before the single quote character.