Skip to content

Commit b24e370

Browse files
committed
update doc
1 parent d1c7f78 commit b24e370

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

docs/src/man/filter.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,19 @@ julia> _tmp = Dataset(vals = vals)
348348
4 │ 0.4
349349
350350
julia> antijoin!(ds1, _tmp, on = :y=>:vals)
351+
2×2 Dataset
352+
Row │ x y
353+
│ identity identity
354+
│ Int64? Float64?
355+
─────┼────────────────────
356+
1 │ 7 0.2
357+
2 │ 4 0.3
358+
359+
julia> ; Since vals is a vector we can directly use filter
360+
361+
julia> ds1 = Dataset(x = [1,7,4,5], y = [.1,.2,.3,.4]);
362+
363+
julia> filter!(ds1, :y, by = !in(Set(vals)))
351364
2×2 Dataset
352365
Row │ x y
353366
│ identity identity

docs/src/man/sorting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,8 @@ julia> ds = Dataset(x = rand(10^6))
376376
in this case we cannot use the round trick directly, however, we can create an alias of `:x` and partially apply `round` trick on alias column and sort the data set based on both columns,
377377

378378
```jldoctest
379-
julia> fmt(x) = round(Int, x*100) # this split data up to 100 parts
380-
julia> ds._tmp = ds.x # alias of :x - it is an instance operation
379+
julia> fmt(x) = round(Int, x*100) # split data up to 100 parts
380+
julia> ds._tmp = ds.x # alias of :x - This is an instance operation
381381
julia> setformat!(ds, :_tmp=>fmt)
382382
julia> @btime sortperm(ds, [:x], alg = QuickSort); # without using formats
383383
36.460 ms (508 allocations: 29.60 MiB)

0 commit comments

Comments
 (0)