# Empty field "\"\"" In CSV Import Problem

I have a huge CSV data, with the format like this:

"5";"8";"2803";
"";"6";"2793";


I import the data with this code:

Import["data.csv", "Table", "FieldSeparators" -> ";"];


The problem is: Due to the empty string "" the table structure is broken: the cell is removed. To fix that, I need to manually edit the file. I replace the empty String "" with anything like "0":

"5";"8";"2803";
"0";"6";"2793";


Is there any option to deal with this? To consider "" as the real element?

Option "RepeatedSeparators" -> False solves the problem:

file = "\"5\";\"8\";\"2803\";
\"\";\"6\";\"2793\";";

ImportString[file, "Table", "FieldSeparators" -> ";", "RepeatedSeparators" -> False]

{{5, 8, 2803, ""}, {"", 6, 2793, ""}}


Although I would consider the default behavior as a bug: the element "" (substring "\"\"" of the whole file) shouldn't be interpreted as an absence of a field, it is just an empty string "" which is a perfectly valid field!

• Thank you Alexey! Feb 1 '18 at 9:00