I have an excel sheet that has four colums of length 10000, and I’d like to create list of tuples from two colums. So, I used list comprehension first, and after 10 minutes is was still running. So, I did this:
twos = Vector{Tuple{Float16, Float16}}()
for i in 1:length(df.First_column)
twos[i] = (df.First_column[i], df.second_column[i])
end
But the above code shows BoundsError: attempt to access 0-element Vector{Tuple{Float16, Float16}} at index [1]. What is not correct?
Is there a better way to create a list of tuples from two excel columns? In each row , I just want to put two adjance columns values into tuples.
I suppose things can get slower if the overall Excel file is bigger (my test file is just 10,000 rows, 2 columns), but I’d say if this is taking longer than a few seconds something is off.