On Fri, Nov 25, 2016 at 8:48 AM, Milan Bouchet-Valat <nalimi...@club.fr> wrote:
> Le vendredi 25 novembre 2016 à 00:35 -0800, programista...@gmail.com a
> écrit :
>> How to convert Char  to Float? What wrong ?
> Use parse(Float64, string(x)), with x the Char.
>

He actually has a string and not a char so no need for the string part.

Also, please stop posting on this list and move to
https://discourse.julialang.org/

>
> Regards
>
>
>> julia> eltype(sort(unique(dane[:,4]))[3])
>> Char
>>
>> julia> (sort(unique(dane[:,4]))[3])
>> "-.097"
>>
>> julia> convert(Float64(sort(unique(dane[:,4]))[3]))
>> ERROR: MethodError: `convert` has no method matching
>> convert(::Type{Float64}, ::UTF8String)
>> This may have arisen from a call to the constructor Float64(...),
>> since type constructors fall back to convert methods.
>> Closest candidates are:
>>   call{T}(::Type{T}, ::Any)
>>   convert(::Type{Float64}, ::Int8)
>>   convert(::Type{Float64}, ::Int16)
>>   ...
>>  in call at essentials.jl:56
>>
>> paul

Reply via email to