DTables.jl icon indicating copy to clipboard operation
DTables.jl copied to clipboard

Adding `first`, `last` and `describe` convenience functions.

Open codetalker7 opened this issue 1 year ago • 1 comments

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.

codetalker7 avatar Aug 09 '23 11:08 codetalker7

@jpsamaroo how does this implementation of first look? If this is okay, I'll implement last similarly.

codetalker7 avatar Aug 09 '23 11:08 codetalker7