Skip to content
Merged
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
16 changes: 16 additions & 0 deletions src/abstractdataframe/selection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,22 @@ julia> combine(gd, :, AsTable(Not(:a)) => sum, renamecols=false)
7 │ 4 1 4 5
8 │ 4 1 8 9
```

# protecting returned vectors from being expanded into multiple rows
```jldoctest
julia> df = DataFrame(a=[1, 1, 2, 2],
b=[[1, 2], [2, 3], [3, 4], [4, 5]]);

julia> gd = groupby(df, :a);

julia> combine(gd, :b => Ref∘sum)
2×2 DataFrame
Row │ a b_Ref_sum
│ Int64 Array…
─────┼──────────────────
1 │ 1 [3, 5]
2 │ 2 [7, 9]
```
"""
combine(df::AbstractDataFrame, @nospecialize(args...);
renamecols::Bool=true, threads::Bool=true) =
Expand Down
Loading