Is better, If ia have file coded UTF8 , use readdlm("data.txt",
'\t',UTF8String) ?
Paul
W dniu 2015-06-24 o 14:52, Avik Sengupta pisze:
Interesting problem! :)
Try:
readlm("data.txt", '\t', ASCIIString)
On Wednesday, 24 June 2015 03:24:58 UTC-4, paul analyst wrote:
Nan is readed as NaN but Nan is the name of cat. How to read this
data ? How to find the cat ?
I have data.txt file , UTF8
Lucy cat
Fliper dog
Mia dog
Nan cat
Snupy dog
julia> data=readd
readdir readdlm
julia> data=readdlm("data.txt",'\t')
5x2 Array{Any,2}:
"Lucy" "cat"
"Fliper" "dog"
"Mia" "dog"
NaN "cat"
"Snupy" "dog"
julia> unique(data[:,1])
5-element Array{Any,1}:
"Lucy"
"Fliper"
"Mia"
NaN
"Snupy"
julia> findin(data[:,1],["Fliper"])
1-element Array{Int32,1}:
2
julia> findin(data[:,1],["Nan"])
0-element Array{Int32,1}
Paul