Hope the evening is a more than hospitable one and you have traded your emacs terminal for some bonne-vivant Ralph Lauren catalog dinner party type scene. As for me, I'm trying to parse a CSV in Julia and things are deteriorating. Here is my code:
f2 = open("/Users/MacBookPro15/testnovo.csv", "r")
skip(f2, 736)
for line in eachline(f2)
string_split = split(line, ",")
println(string_split[1])
end
Now if I substitute string_split[2] or anything other than [1] I get a BoundsError and it's rather frustrating because I need those items. Can anyone tell me how to avoid this?
Every time I hear "parsing a CSV" I want to duck and cover my ears, before I get flashbacks of a missing quote, or a 32-column line 98% of the way through a 33-column, 10GB csv file.
Fortunately, there are two useful functions that'll prevent you from rolling your own csv parser:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With