Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a groupby method #64

Merged
merged 5 commits into from
Jan 22, 2024
Merged

add a groupby method #64

merged 5 commits into from
Jan 22, 2024

Conversation

rafaqz
Copy link
Contributor

@rafaqz rafaqz commented Jan 18, 2024

Add a groupby method to DataAPI so it can be shared accross packages like DataFrames.jl and DimensionalData.jl.

See: rafaqz/DimensionalData.jl#591

src/DataAPI.jl Outdated Show resolved Hide resolved
src/DataAPI.jl Outdated Show resolved Hide resolved
@bkamins
Copy link
Member

bkamins commented Jan 18, 2024

Also a bump in package version is needed for the release.

Copy link

codecov bot commented Jan 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b1e6855) 96.49% compared to head (102d52f) 96.49%.

❗ Current head 102d52f differs from pull request most recent head 1b8a546. Consider uploading reports for the commit 1b8a546 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #64   +/-   ##
=======================================
  Coverage   96.49%   96.49%           
=======================================
  Files           1        1           
  Lines          57       57           
=======================================
  Hits           55       55           
  Misses          2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nalimilan
Copy link
Member

Does it really make sense to have a docstring that says so little? Also, docstrings are exposed to users, so indications intended only at implementers would better go elsewhere. For join functions (leftjoin , etc.), we currently don't provide any docstring, and instead use a comment inside the code.

@bkamins
Copy link
Member

bkamins commented Jan 18, 2024

I am OK to turn this into a comment.

@rafaqz
Copy link
Contributor Author

rafaqz commented Jan 22, 2024

Any objections to adding aggregate here at the same time for the same reason?

@bkamins
Copy link
Member

bkamins commented Jan 22, 2024

What packages use aggregate currently? DataFrames.jl does not use this name.

@rafaqz
Copy link
Contributor Author

rafaqz commented Jan 22, 2024

Really?

julia> aggregate
WARNING: both Rasters and DataFrames export "aggregate"; uses of it
 in module Main must be qualified

Maybe a reexport? oh its deprecated.

But in practice that amounts to the same thing for users of both packages.

@bkamins
Copy link
Member

bkamins commented Jan 22, 2024

We will remove aggregate in the next release of DataFrames.jl then.

@bkamins
Copy link
Member

bkamins commented Jan 22, 2024

OK. @nalimilan - the state is that we export by and aggregate. I think no one uses them, we deprecated them many years ago.

Would you be OK to remove:

export by, aggregate

# TODO: remove definitions in 2.0 release
by(args...; kwargs...) = throw(ArgumentError("by function was removed from DataFrames.jl. " *
                                             "Use the `combine(groupby(...), ...)` or `combine(f, groupby(...))` instead."))
aggregate(args...; kwargs...) = throw(ArgumentError("aggregate function was removed from DataFrames.jl. " *
                                                    "Use the `combine` function instead."))

before 2.0 release (it is technically breaking, but in practice I think it is not problematic to drop it.

@nalimilan
Copy link
Member

Sure.

@bkamins bkamins merged commit d6d1b05 into JuliaData:main Jan 22, 2024
3 checks passed
@bkamins
Copy link
Member

bkamins commented Jan 22, 2024

Released

@rafaqz rafaqz deleted the groupby branch February 11, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants