In the Arrow.jl package we added a method
function DataAPI.levels(x::DictEncoded)
rp = DataAPI.refpool(x) # may contain missing values
Missing <: eltype(rp) || return rp
convert(AbstractArray{nonmissingtype(eltype(rp))}, deleteat!(rp, ismissing.(rp)))
end
Should there be a similar method for PooledArray?
At present the default method for levels ends up sorting the pool.
In the
Arrow.jlpackage we added a methodShould there be a similar method for
PooledArray?At present the default method for
levelsends up sorting the pool.