# "Re-infer" container eltype

**URL:** <https://discourse.julialang.org/t/re-infer-container-eltype/21341>\
**Category:** New to Julia\
**Created:** [March 1, 2019, 1:00pm UTC](https://discourse.julialang.org/t/re-infer-container-eltype/21341 "2019-03-01T13:00:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [March 1, 2019, 1:00pm UTC](https://discourse.julialang.org/t/re-infer-container-eltype/21341/1 "2019-03-01T13:00:46Z")

</div>

I have a container, e.g. a `DataFrame`, where a column `eltype` is more general than the actual type of values:

```julia
using DataFrames, Query

df = DataFrame(a = [[1], [2], [1 2; 3 4]])
df = df |> @filter(ndims(_.a) == 1) |> DataFrame
eltype(df[:a])
# Array{Int64,N} where N

```

And if I want the eltype to be concrete and match the actual content, splatting works: `eltype([df[:a]...]) == Array{Int64,1}`. However it is inefficient, so is there any other way to force “re-inferring” of an eltype?
