How to read specific columns of a csv file

In your case it’s either

y_train = CSV.File("test.csv"; select=[1])

or

y_train = CSV.File("test.csv"; select=[:a])

see Examples · CSV.jl

3 Likes