When importing a csv file with empty fields as a Dataset
, the empty fields are set to zero-length strings (""). There is an option, EmptyField
, which replaces the zero-length string with an arbitrary string, but I don't see a way to set empty fields to Missing[]
or some other value indicating missing data.
The import code is:
data = Import["file.csv",{"CSV","Dataset"},"HeaderLines"->1, "EmptyField"->""]
The result is the same as leaving EmptyField
out since "" is the default. However, all attempts at setting EmptyField
to Missing[]
, Null
, or None
fail. For example:
Is there a way to set empty fields to Missing[]
?