DTables.jl
DTables.jl copied to clipboard
Adding `first`, `last` and `describe` convenience functions.
Still a draft PR.
This PR adds implementations of the first
, last
and describe
convenience functions.
Examples
Here is how first
works:
julia> using DTables;
julia> table = (a=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], b=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
julia> d = DTable(table, 3)
DTable with 4 partitions
Tabletype: NamedTuple
julia> first_five = DTables.first(d, UInt(5))
DTable with 2 partitions
Tabletype: NamedTuple
julia> fetch(first_five)
(a = [1, 2, 3, 4, 5], b = [1, 2, 3, 4, 5])
TODO:
- [ ] Finalize implementation of
first
. - [ ] Finalize implementation of
last
. - [ ] Finalize implementation of
describe
. - [ ] Add documentation.
- [ ] Add relevant tests.
@jpsamaroo how does this implementation of first
look? If this is okay, I'll implement last
similarly.