Hello,
I would like to find the percentile and interquartile range of a column of a dataframe.
I have loaded both Statistics and StatsBase, but when I try iqr(N[:column])
I get:
ERROR: MethodError: no method matching iqr(::Array{Union{Missing, Int64},1})
Closest candidates are:
iqr(::AbstractArray{#s77,N} where N where #s77<:Real) at ~/.julia/packages/StatsBase/XePnn/src/scalarstats.jl:288
Stacktrace:
[1] top-level scope at none:0
and similarly,
percentile(N[:column], 25)
ERROR: MethodError: no method matching percentile(::Array{Union{Missing, Int64},1}, ::Int64)
Closest candidates are:
percentile(::AbstractArray{#s35,N} where N where #s35<:Real, ::Any) at ~/.julia/packages/StatsBase/XePnn/src/scalarstats.jl:174
Stacktrace:
[1] top-level scope at none:0
Using the help function of REPL I got:
help?> iqr
search: iqr isqrt PartialQuickSort
iqr(v)
Compute the interquartile range (IQR) of an array, i.e. the 75th percentile minus the 25th percentile.
help?> percentile
search: percentile
percentile(v, p)
Return the pth percentile of a real-valued array v, i.e. quantile(x, p / 100).
Could these stats be computed on a dataframe? What am I getting wrong?
Thank you