Stream: helpdesk (published)

Topic: vcat dataframes with pooledarrays


view this post on Zulip Benedikt Ehinger (Mar 23 2024 at 12:44):

I expected this to work:

using DataFrames,PooledArrays

d = DataFrame(:x=>PooledArray([1,2,3]))
isa(vcat(d,d).x,PooledArray) # false

But the vcat casts it to Vector.

even though:

isa(vcat(d.x,d.x),PooledArray) #true

works as I expected. Any insights how I can keep the type?

view this post on Zulip jar (Mar 23 2024 at 18:12):

@Bogumił Kamiński might know

view this post on Zulip jar (Mar 23 2024 at 22:40):

Related to this he just opened https://github.com/JuliaData/PooledArrays.jl/issues/88 and https://github.com/JuliaData/DataFrames.jl/issues/3432.

view this post on Zulip Benedikt Ehinger (Mar 23 2024 at 23:18):

thanks! I'll probably recast them then for now :)


Last updated: Nov 22 2024 at 04:41 UTC