Skip to content

Automatic re-sizing with ByRow in combine #2549

@pdeffebach

Description

@pdeffebach

perhaps for combine and ByRow we should re-size tables

julia> df = DataFrame(a = [1, 2]);

julia> combine(groupby(df, :a), :a => (t -> [100, 200]) => :b)
4×2 DataFrame
 Row │ a      b     
     │ Int64  Int64 
─────┼──────────────
   1 │     1    100
   2 │     1    200
   3 │     2    100
   4 │     2    200

julia> combine(groupby(df, :a), :a => ByRow(t -> [100, 200]) => :b)
2×2 DataFrame
 Row │ a      b          
     │ Int64  Array…     
─────┼───────────────────
   1 │     1  [100, 200]
   2 │     2  [100, 200]

No big deal if not. I actually think this change might not be that hard.

This would be a breaking change so it's fine to wait until much further down the line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions