这里有一个temp::DataFrameRow
我要做的是统计temp中missing的个数,那么我应该这么写
length(filter(ismissing,temp))
,但这个会报错,先不管他,给你们看看这里怪在哪里
# 1.
julia> ismissing(temp[1])
true
# 2.
julia> map(ismissing,temp)
(color = true,
director_name = false,
num_critic_for_reviews = true,
duration = true,
director_facebook_likes = false,)
# 3.
julia> [ismissing(i) for i in temp]
5-element Array{Bool,1}:
1
0
1
1
0
# 4.
julia> filter(ismissing,temp)
ERROR: MethodError: no method matching filter(::typeof(ismissing), ::DataFrameRow{DataFrame,DataFrames.Index})
Closest candidates are:
filter(::Function, ::DataStructures.LinkedList{T}) where T at /home/steiner/.julia/packages/DataStructures/GvsTk/src/list.jl:82
filter(::Function, ::DataStructures.MutableLinkedList{T}) where T at /home/steiner/.julia/packages/DataStructures/GvsTk/src/mutable_list.jl:93
filter(::Any, ::Tuple{Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Vararg{Any,N}} where N) at tuple.jl:267
...
Stacktrace:
[1] top-level scope at REPL[131]:1
有没有人告诉我应该怎么做啊