pwwang / datar

A Grammar of Data Manipulation in python
https://pwwang.github.io/datar/
MIT License
267 stars 17 forks source link

[ENH] From "with_groups()" to "by" within verbs.... #193

Open coforfe opened 10 months ago

coforfe commented 10 months ago

Feature Type

Problem Description

Hi,

The latest versions of dplyr includes an important design change when grouping.

For your reference Hadley Wikham has recognized recently that using group_by() was a design mistake: https://news.ycombinator.com/item?id=30067406

Feature Description

So the proposal would be to align datar functionality to dplyr by modifying the verbs (mutate, slice, summarize) in order to include a new parameter by where one can specify the variable/s to use for the grouping.

This new functionality would substitute the current with_groups() and ungroup() functions.

Thank! Carlos.

Additional Context

No response

pwwang commented 10 months ago

This feature is still experimental with dplyr.

See:

https://dplyr.tidyverse.org/reference/mutate.html https://dplyr.tidyverse.org/reference/summarise.html https://dplyr.tidyverse.org/reference/slice.html

We will introduce it until it's stabilized.

coforfe commented 10 months ago

OK. Good!.