JuliaData / JuliaData/DataAPI.jl

Add `combine`

Open
#65 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
35
Forks
13
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the proposed combine signatures with DimensionalData.jl and DataFrames.jl usage, including groupby and do-block forms. The issue does not name implementation files or tests. Done would require a settled argument order and an agreed interoperability rule for packages extending combine.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.