Error on CSV.read attempt
Came across an issue when attempting to read a csv file into a Dataframe.
The code:
CSV.read("chuckle/random.csv", DataFrame)
The error:
ERROR: MethodError: Cannot `convert` an object of type Missing to an object of type String
Without setting the quoted= and using this as a csv file:
"Name","Address","CSZ"
"Rachel Smith","123 Main St","Oldtown, NY 12345"
"Herbert "Bert" Jones","564 Second St","Oldtown, NY 12345"
"Joe Brown","879 Fourth St","Oldtown, NY 12345"
Does setting quoted=false give you the behaviour you expect? With quote=true (the default), i don't believe this is a valid CSV file.
Sharing a reproducible example would be helpful. At the very least, this is an unhelpful error message -- and it'd be great to improve that -- but i can't replicate it from the info provided.
This Issue came in reference from this conversation on Discourse. I was mainly concerned about this being a suboptimal error message: the core issue is malformed CSV input on a particular line, but the error is due to the immediate internal issue (can’t convert missing to string).
@mikeingold does the OP look better now, or should I tweak it more?
The problem in this discourse discussion seems to be related.