How to coerce scitype union to continuous?

All columns in my DataFrame have the sci type Union{Continuous, Count} and I’m having trouble coercing them to Continuous. I tried the following two ways

coerce(X, Count=>Continuous) 
X |> eachcol .|> a -> coerce(a, Continuous)

the first one doesn’t work and the second returns an error.

`float` not defined on abstractly-typed arrays; please convert to a more specific type

What is the correct way to do this?

Interesting case. I don’t think ScientificTypes currently handles this directly. It’s a bit weird as it looks like you have mixed eltype where you would ordinarily expect promotion to have occurred. You’ll need to force promotion manually first. Here’s the idea:

julia> v = Union{Int,Float64}[1, 2.3, 4, 4.5]
4-element Vector{Union{Float64, Int64}}:
 1
 2.3
 4
 4.5

julia> scitype(v)
AbstractVector{Union{Continuous, Count}} (alias for AbstractArray{Union{Continuous, Count}, 1})

julia> coerce([v...], Continuous)
4-element Vector{Float64}:
 1.0
 2.3
 4.0
 4.5

So maybe you do

X |> eachcol .|> a -> coerce([a...], Continuous)