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

make sort kwarg in groupby more flexible #2812

Merged
merged 10 commits into from
Jul 24, 2021
Merged

make sort kwarg in groupby more flexible #2812

merged 10 commits into from
Jul 24, 2021

Conversation

bkamins
Copy link
Member

@bkamins bkamins commented Jul 7, 2021

Fixes #2762.

If we accept it then:

  • by default we use the fastest algorithm
  • if user passes sort=false explicitly then groups are created in order of appearance
  • if user passes sort=true then groups are sorted

If we agree to add this extension I will add tests and NEWS.md entry and finalize this PR.

@bkamins bkamins added this to the 1.3 milestone Jul 7, 2021
@bkamins bkamins added feature grouping non-breaking The proposed change is not breaking labels Jul 7, 2021
@bkamins bkamins requested a review from nalimilan July 7, 2021 22:09
@bkamins bkamins marked this pull request as ready for review July 12, 2021 17:59
@bkamins
Copy link
Member Author

bkamins commented Jul 12, 2021

@nalimilan - this PR should be good for review.

@pdeffebach - you might want to have a look at it in the context of DataFramesMeta.jl. Thank you!

NEWS.md Outdated Show resolved Hide resolved
test/grouping.jl Outdated Show resolved Hide resolved
test/grouping.jl Outdated Show resolved Hide resolved
bkamins and others added 2 commits July 24, 2021 14:20
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
@bkamins bkamins merged commit d41d708 into main Jul 24, 2021
@bkamins bkamins deleted the bl/groupby_sort branch July 24, 2021 12:24
@bkamins
Copy link
Member Author

bkamins commented Jul 24, 2021

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature grouping non-breaking The proposed change is not breaking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add a keyword to specify group order in groupby
2 participants