I have a number of CSV files with values of “” interspersed with data values. Under previous Wolfram versions, these imported as “” (which is how they appear in the file). However under Mathematica 14.2 (I just upgraded), I now have many many Missing[NotAvailable] instead of the “”. The data is not missing.
I searched the forum under CSV and Missing[NotAvailable] and was surprised not to find something.
Command:
Import[ fileName.csv]
and similar result
Import[ filename.csv, "CSV"]
Obviously, no problem with I say Import[ fileName.csv, “Text”] as the problem is in the Import process.
I explored setting a MissingValuePattern, EmptyField, and other ideas, but nothing has worked yet.
Any recommendations (other than import text and do it myself)?
This behavior is documented and the workaround is provided in the Possible Issues section of CSV—Wolfram Documentation.
You should use MissingValuePattern -> None.
Thank You! That is exactly what I was looking for. It fixed the problem.
I figured there was an option. I had tried MissingValuePattern → “” without success. I had not considered None. The documentation seemed to me to suggest a need for a pattern or test.
Thank you for pointing out the note in Possible Issues. I didn’t check there this time, although I have looked at Possible Issues in the past. I’ve never seen as long a list of issues. I’m not sure I would have immediately recognized the connection between the ImportString example and the Import, but I agree now it’s a good example. I see a few other notes for 14.2, so I’ll keep them in mind as I port the code over. Thanks again!