From b5d6c61ea8af1b750be32e7bc6f6744da1cb74d2 Mon Sep 17 00:00:00 2001 From: quinnj Date: Sat, 25 Nov 2017 22:50:43 -0700 Subject: [PATCH] Update DataStreams allocate for CategoricalString --- src/abstractdataframe/io.jl | 2 ++ 1 file changed, 2 insertions(+) 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} =