diff --git a/src/abstractdataframe/io.jl b/src/abstractdataframe/io.jl index 4a8dc4329a..97c0c90834 100644 --- a/src/abstractdataframe/io.jl +++ b/src/abstractdataframe/io.jl @@ -230,6 +230,8 @@ Data.streamtypes(::Type{DataFrame}) = [Data.Column, Data.Field] Data.weakrefstrings(::Type{DataFrame}) = true allocate(::Type{T}, rows, ref) where {T} = Vector{T}(rows) +allocate(::Type{CategoricalString{R}}, rows, ref) where {R} = CategoricalArray{String, 1, R}(rows) +allocate(::Type{Union{CategoricalString{R}, Missing}}, rows, ref) where {R} = CategoricalArray{Union{String, Missing}, 1, R}(rows) allocate(::Type{CategoricalValue{T, R}}, rows, ref) where {T, R} = CategoricalArray{T, 1, R}(rows) allocate(::Type{Union{Missing, CategoricalValue{T, R}}}, rows, ref) where {T, R} =