df_temp = df[findin(df[:pmid],pmids),:]
但是,当我尝试使用Julia 1.1.1中的findall((in)b,a)函数进行相同操作时,如下所示;
df_temp = df[findall((in)(pmids),df[:pmid]),:]
我收到以下错误。
ERROR: LoadError: MethodError: no method matching parse(::SubString{String}) Closest candidates are:
parse(!Matched::Type{DecFP.Dec32}, !Matched::AbstractString) at C:\Users\Thor\.julia\packages\DecFP\3jJW7\src\DecFP.jl:224
parse(!Matched::Type{LibGit2.GitCredential}, !Matched::AbstractString) at C:\cygwin\home\Administrator\buildbot\worker\package_win32\build\usr\share\julia\stdlib\v1.1\LibGit2\src\gitcredential.jl:73
parse(!Matched::Type{LibGit2.GitCredentialHelper}, !Matched::AbstractString) at C:\cygwin\home\Administrator\buildbot\worker\package_win32\build\usr\share\julia\stdlib\v1.1\LibGit2\src\gitcredential.jl:163
Stacktrace:
[1] _broadcast_getindex_evalf at .\broadcast.jl:578 [inlined]
[2] _broadcast_getindex at .\broadcast.jl:551 [inlined]
[3] getindex at .\broadcast.jl:511 [inlined]
[4] copy at .\broadcast.jl:787 [inlined]
[5] materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(parse),Tuple{Array{SubString{String},1}}}) at .\broadcast.jl:753
[6] get_features_labels(::DataFrame, ::Array{Int32,1}) at C:\Users\Thor\Documents\MachineLearning\Work\classifiers.jl:208
[7] test_analysis_skl(::DataFrame, ::Array{Int32,1}, ::Array{Int32,1}, ::Symbol, ::Dict{Symbol,Any}) at C:\Users\Thor\Documents\Machine Learning\Work\crossval_and_stats.jl:24
[8] main() at C:\Users\Thor\Documents\MachineLearning\Work\machine_learning_regsampling.jl:79
[9] top-level scope at none:0
[10] include at .\boot.jl:326 [inlined]
[11] include_relative(::Module, ::String) at .\loading.jl:1038
[12] include(::Module, ::String) at .\sysimg.jl:29
[13] exec_options(::Base.JLOptions) at .\client.jl:267
[14] _start() at .\client.jl:436 in expression starting at C:\Users\Thor\Documents\MachineLearning\Work\machine_learning_regsampling.jl:181
我想知道你为什么会这样?