ERROR: BoundsError: attempt to access 85124553-element Array{UInt8,1} at index [4:85124553, 2]

symbols = data[4:end, 2]

The above code is throwing the error in the title and I cannot figure out why.
The below code that I run right before it in my file works just fine and I know and have checked that there are at least 2 columns in data.

probes = data[4:end, 1]

Does anyone know what is happening? I am reading in data from a CSV using a the CSV package.

You seem to be accessing a Vector (Array{UInt8,1}) which does not have a second dimension, so you can’t use that , 2] part. Julia allows indexing with extra dimensions if the index is 1, so thats why the second example does not throw. Normally indexing a vector is done with one index, e.g. data[4:end] etc.

What is meant by second dimension? Does that mean that it has more than one column? because if so it does have more than one column

Can you share the full code + csv file where you’re seeing this issue? It’s possible there’s a bug in the CSV.jl code that is causing this issue underneath, but in order to diagnose, I need a way to reproduce the problem, even if you can just share the file/code w/ me privately.


How would I message you specifically?

Discourse has a way to private message on here. Or my email is on my GitHub profile