Closed xanderdunn closed 7 years ago
I run CSV.parse_string(some_string, header: false) and get the same output as when I run CSV.parse_string(some_string, header: true).
CSV.parse_string(some_string, header: false)
CSV.parse_string(some_string, header: true)
some_string looks like:
some_string
"id,probability\nn00e1d5ebcf3d4d5,0.51228\nnb0b4cce48b78471,0.51814\nn...
so I'd expect to get ["id", "probability"] in the header: false case, but I don't get it. I always get the same result:
["id", "probability"]
header: false
[["n00e1d5ebcf3d4d5", "0.51228"], ["nb0b4cce48b78471", "0.51814"], ... ]
I have nimble_csv 0.3.0. Am I misusing the header option?
header
It should be :headers (plural).
:headers
Thanks, that worked. I guess it was changed to header in 0.4.0?
I run
CSV.parse_string(some_string, header: false)
and get the same output as when I runCSV.parse_string(some_string, header: true)
.some_string
looks like:so I'd expect to get
["id", "probability"]
in theheader: false
case, but I don't get it. I always get the same result:I have nimble_csv 0.3.0. Am I misusing the
header
option?