Skip to content

Commit 4fa469a

Browse files
committed
update docstring for byrow with generic function.
1 parent 96775d7 commit 4fa469a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/byrow/doc.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,4 +1233,9 @@ Variant of `byrow(stdze!)` which pass a copy of `ds` and leave `ds` untouched.
12331233
byrow(ds::AbstractDataset, fun, cols; [threads])
12341234
12351235
Return the result of calling `fun` on each row of `ds` selected by `cols`. The `fun` function must accept one argument which contains the values of each row as a vector of values and return a scalar.
1236+
1237+
For generic functions there are two special cases:
1238+
1239+
* When `cols` is a single column, `byrow(ds, fun, cols)` acts like `fun.(ds[:, cols])`
1240+
* When `cols` is referring to exactly two columns and it is possible to pass two vectors as arguments of `fun`, `byrow` returns `fun.(ds[:, col1], ds[:, col2])` when possible.
12361241
"""

0 commit comments

Comments
 (0)