Training dataset and reporting MSE

I guess your csv doesn’t have headers? You can do a number of things:

  1. Manually add a header line to the csv (just add a row in Excel or something and type names for columns into it)

  2. Pass the header directly into CSV.read like CSV.read("myfile.csv", header = ["first_column_name", "second_column_name", "third_column_name"])

  3. If you’ve read the file into a DataFrame (let’s call it df) already you can call rename!(df, [:first_column_name, :second_column_name, :third_column_name]) on it

1 Like