Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constructor from a Dict #76

Open
Moelf opened this issue Jun 19, 2021 · 2 comments
Open

Constructor from a Dict #76

Moelf opened this issue Jun 19, 2021 · 2 comments

Comments

@Moelf
Copy link

Moelf commented Jun 19, 2021

julia> using TypedTables

julia> a = Dict("a" => [1,2,3], "b"=>[1.0, 2.0, 3.0])
Dict{String, Vector{T} where T} with 2 entries:
  "b" => [1.0, 2.0, 3.0]
  "a" => [1, 2, 3]

julia> Table(a)
ERROR: Cannot construct table from Dict{String, Vector{T} where T}
Stacktrace:

Dataframes support this, I wonder how hard it would be to support it directly here.

@andyferris
Copy link
Member

Thanks for the suggestion.

I wonder if we can make this a Tables.jl table?

@Moelf
Copy link
Author

Moelf commented Jun 20, 2021

the use case is that I want to loop through each row of each dataframe after a groupby operation, which looks to me requires flexibility from DataFrames and followed by a TypedTables "wrapper" to help with the performance within the for row in eachrow() loop because compiler knows what row.col_name is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants