Skip to content

Add combine #65

Open
Open
@rafaqz

Description

@rafaqz

I should have added this in #64.

But it makes sense to add combine here to so that DimensionalData.jl can use it and not clash with DataFrames.jl.

One question I have is the argument order. In DD it would make sense to do something like:

combine(mean, groupby(dimarray, Ti=>month); dims=Ti)

And allow a do block for the function in combine.

But DataFrames.jl is using a different syntax: combine(df, [:X, :Y] .=> mean) where the functions are in the second argument, and they are connected to columns so a do block cant work anyway.

Maybe the rule can be the extending package must either 1. own the first argument, or 2. own the second argument where the first is <:Function ? With the downside that the owned object cant be <: Function in 1.

The other option is DD uses combine(groupby(dimarray, Ti=>month), mean; dims=Ti), its just unfortunate to break the usual function-first argument order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions