JuliaData / TypedTables.jl

Simple, fast, column-based storage for data analysis in Julia
Other
147 stars 25 forks source link

Implement rand #87

Open jtrakk opened 2 years ago

jtrakk commented 2 years ago

Currently rand returns a vector of namedtuples.

julia> rand(Table([(a=1,b=2), (a=10,b=20)]), 2)
2-element Vector{NamedTuple{(:a, :b), Tuple{Int64, Int64}}}:
 (a = 10, b = 20)
 (a = 1, b = 2)

What do you think about returning a Table?

andyferris commented 2 years ago

Yeah that's a cool idea.

Data generation is a pretty important topic - it would be cool to be able to specify a "distribution" for each column somehow. Not sure how to design that though.