Hey,
I've been using Julia on and off for the past couple of months and I 
noticed (maybe my memory doesn't serve me well) that if I read a CSV 
(through the built-in readcsv), and impose the data type as Float64, it 
won't coerce non-numerical values to NaNs like it used to. I checked the 
documentation and it says

If T is a numeric type, the result is an array of that type, with any 
> non-numeric elements as NaN for floating-point types, or zero. 
>

But when I run readcsv(s, Float64), I get
 
ERROR: file entry "Date" cannot be converted to Float64
 in error at error.jl:21
 in store_cell at datafmt.jl:198
 in dlm_fill at datafmt.jl:312
 in readdlm_string at datafmt.jl:276
 in readdlm_auto at datafmt.jl:59
 in readdlm at datafmt.jl:50
 in readdlm at datafmt.jl:44
 in readcsv at datafmt.jl:489

I therefore wanted to ask if I misunderstood the documentation or what's 
happening here. I don't mind reading it as it is and stripping out the 
non-numericals, it's not a big deal, I'm just checking.

Thanks
Oli

Reply via email to