You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to append! a NamedTuple to Table... and noticed this odd behiavor
julia> t =Table(a = [1, 2, 3], b = [2.0, 4.0, 6.0])
Table with 2 columns and 3 rows:
a b
┌───────
1 │ 12.02 │ 24.03 │ 36.0
julia>append!(t, (a=4, b=8.0))
ERROR: MethodError: Cannot `convert` an object of type Int64 to an object of type @NamedTuple{a::Int64, b::Float64}
Closest candidates are:convert(::Type{NT}, ::NT) where {names, T<:Tuple, NT<:NamedTuple{names, T}}
@ Base namedtuple.jl:184convert(::Type{T}, ::T) where T
@ Base Base.jl:84convert(::Type{NT}, ::NamedTuple{names}) where {names, T<:Tuple, NT<:NamedTuple{names, T}}
@ Base namedtuple.jl:186...
Stacktrace:
[1] setindex!
@ C:\Users\femto\.julia\packages\TypedTables\ItVth\src\Table.jl:142 [inlined]
[2] _append!
@ .\array.jl:1201 [inlined]
[3] append!(a::Table{@NamedTuple{…}, 1, @NamedTuple{…}}, iter::@NamedTuple{a::Int64, b::Float64})
@ Base .\array.jl:1187
[4] top-level scope
@ REPL[31]:1
Some type information was truncated. Use `show(err)` to see complete types.
julia> t
Table with 2 columns and 5 rows:
a b
┌────────────
1 │ 12.02 │ 24.03 │ 36.04 │ 31.0e-3235 │ 31.0e-323
These 2 rows are intriguing
4 │ 3 1.0e-323
5 │ 3 1.0e-323
Any idea what is causing that?
Would it be possible to append! a NamedTuple to a Table (without creating a Table from NamedTuple)
Kind regards
The text was updated successfully, but these errors were encountered:
Hello,
I was trying to append! a NamedTuple to Table... and noticed this odd behiavor
These 2 rows are intriguing
Any idea what is causing that?
Would it be possible to append! a NamedTuple to a Table (without creating a Table from NamedTuple)
Kind regards
The text was updated successfully, but these errors were encountered: