Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ using Tables
using Documenter
using Documenter.Remotes: GitHub

DocMeta.setdocmeta!(Tables, :DocTestSetup, :(using Tables); recursive=true)

makedocs(;
modules=[Tables],
format=Documenter.HTML(),
Expand Down
11 changes: 5 additions & 6 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ arguments to `ByRow` does not allow it to determine the number of rows of the
source table).

# Examples
```
```jldoctest
julia> Tables.ByRow(x -> x^2)(1:3)
3-element Vector{Int64}:
1
Expand All @@ -206,14 +206,13 @@ julia> Tables.ByRow(x -> x.a)((a=1:2, b=3:4))
1
2

julia> Tables.ByRow(x -> (a=x.a*2, b=sin(x.b), c=x.c))((a=[1, 2, 3],
b=[1.2, 3.4, 5.6],
c=["a", "b", "c"]))
3-element Vector{NamedTuple{(:a, :b, :c), Tuple{Int64, Float64, String}}}:
julia> Tables.ByRow(x -> (a=x.a*2, b=sin(x.b), c=x.c))((a=[1, 2, 3],
b=[1.2, 3.4, 5.6],
c=["a", "b", "c"]))
3-element Vector{@NamedTuple{a::Int64, b::Float64, c::String}}:
(a = 2, b = 0.9320390859672263, c = "a")
(a = 4, b = -0.2555411020268312, c = "b")
(a = 6, b = -0.6312666378723216, c = "c")

```
"""
struct ByRow{T} <: Function
Expand Down
Loading