Although you could, probably, do this in pure Julia, is there a reason to not write a small preprocessing script using sed (or your OS’s equivalent) to create altered copies of the data before reading it? If HDD space is an issue, you could do this one file at a time using Julia’s run method, i.e. something like
dfile = "your-data-file.dat"
run(`copy_and_replace.sh $dfile`)
data = readdlm("$dfile.copy")
run(`rm $dfile.copy`)
where the shell script copy_and_replace.sh copies the raw data (with file name given in the first argument) into a new file with the string “.copy” appended to the name, and then replaces all occurences of D with E (or e, or whatever you need) using sed.
// T
file entry "" cannot be converted to Float64
Space is an issue, yes, but I agree, I can process them one by one using some sed scripting. I just thought there is a simple idiom corresponding to Python's 2-liner above.
datastring = replace(readall("foo.dat"), "D", "e")data = readdlm(IOBuffer(datastring))
OT: I get the code boxes using an extension to Chrome called Markdown Here - it works real well, but it has the disadvantage that you have to manually do the conversion before sending, and I keep forgetting :P
// T