I'm new to Julia and i have a dataset with this matrix given. I need to only extract the first number of each of the middle strings. Since they are a saved as one string i don't know how to that.
4×3 Matrix{Any}:
123.12 "[123.3, 15.4]" 5
223.12 "[523.3, 85.4]" 6
323.12 "[623.3, 95.4]" 7
423.12 "[723.3, 115.4]" 8
I tried to convert the string into a float like this and then get the number but it doesn't really work for me.
number = parse.(Float64, split(str, ","))
I assume that your data comes from files such as this:
You read this file
using DelimitedFilesSince the data in second column is in JSON format you can parse that column
using JSON3:If you want combine this to a matrix you could do: