Skip to content

Commit 393eca8

Browse files
committed
up readme
1 parent 137eaed commit 393eca8

File tree

1 file changed

+35
-4
lines changed

1 file changed

+35
-4
lines changed

README.md

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,42 @@
1-
# WIP: moving DTables out of Dagger
2-
3-
test pr
4-
51
# DTables
62

3+
Distributed table structures and data manipulation operations built on top of [Dagger.jl](https://github.com/JuliaParallel/Dagger.jl)
4+
75
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliaparallel.github.io/DTables.jl/stable/)
86
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliaparallel.github.io/DTables.jl/dev/)
97
[![Build Status](https://github.com/juliaparallel/DTables.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/juliaparallel/DTables.jl/actions/workflows/CI.yml?query=branch%3Amain)
108
[![Coverage](https://codecov.io/gh/juliaparallel/DTables.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/juliaparallel/DTables.jl)
119
[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle)
10+
11+
# Usage
12+
13+
Below you can find a quick example on how to get started with DTables.
14+
15+
There's a lot more you can do though, so please refer to the documentation!
16+
17+
18+
```julia
19+
# launch a Julia session with threads/workers
20+
21+
julia> using DTables
22+
23+
julia> dt = DTable((a=rand(100), b=rand(100)), 10)
24+
DTable with 10 partitions
25+
Tabletype: NamedTuple
26+
27+
julia> m = map(r -> (x=sum(r), id=Threads.threadid(),), dt)
28+
DTable with 10 partitions
29+
Tabletype: NamedTuple
30+
31+
julia> xsum = reduce((x, y) -> x + y, m, init=0, cols=[:x])
32+
EagerThunk (running)
33+
34+
julia> threads_used = reduce((acc, el) -> union(acc, el), m, init=Set(), cols=[:id])
35+
EagerThunk (running)
36+
37+
julia> fetch(xsum)
38+
(x = 95.71209812014976,)
39+
40+
julia> fetch(threads_used)
41+
(id = Set(Any[5, 4, 6, 13, 2, 10, 9, 12, 8, 3]),)
42+
```

0 commit comments

Comments
 (0)