Skip to content

Error "type Dict has no field" #352

Open
@jariji

Description

julia> DataFrame([Dict("a" => 1), Dict()])
ERROR: type Dict has no field a
Stacktrace:
  [1-10]  internal
       @ Base, Tables, DataFrames, Unknown
    [11] DataFrame(x::Vector{Dict})
       @ DataFrames ~/.julia/packages/DataFrames/58MUJ/src/other/tables.jl:48
Use `err` to retrieve the full stack trace.

julia> DataFrame([Dict("a" => 1), Dict("a" => 2)])
2×1 DataFrame
 Row │ a     
     │ Int64 
─────┼───────
   11
   22

I think this error message isn't that clear. Perhaps better:

Dict at index 2 has no key "a".

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions