-
Notifications
You must be signed in to change notification settings - Fork 11
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
Implementation of group_by+mutate #242
base: main
Are you sure you want to change the base?
Conversation
This solves issue #201. Other functions to be applied to grouped data can be easily implemented in the same fashion. |
tidypolars/tibble.py
Outdated
assert isinstance(by, str) or isinstance(by, list), "Use list or string to group by." | ||
super().__init__(df, by, *args, **kwargs) | ||
self.df = df | ||
self.by = by if isinstance(by, list) else list(by) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a little tweek here:
self.by = by if isinstance(by, list) else [by]
Apologies for the long response time on this - I will take a look either this weekend or early next week. I think with the |
Can you break this into multiple pull requests? |
I'm starting to review but there are multiple parts - it would be nice to address each addition separately. For each part we need to discuss code changes and tests (none of these functions have tests as of yet). Can you pick one of these to start with at least? If you do
|
Feel free to cherry-pick each commit in the repo. |
We can try and do it all in one but this is an overly large PR at the moment. Moving forward each PR must have a (generally) unique purpose. Some of these pieces could be merged tomorrow with very little effort whereas others are going to take a while to update - which means none of this is getting merged for a while (I could be wrong maybe it will go faster than I think). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you think we should go about the changes above? They are pretty straightforward. |
Just make the commits on your repo. Once all the changes are done with tests and changelog we're good to merge. |
If you need ideas for tests my |
If you haven't used |
All done, except for the test. If you or someone could implement the tests, that would be great. |
I can help a little with tests, but you’ll need to build some here (and in every pull request). In general for every PR you need the function, a test or a two, and to update the changelog. |
The implementation makes it consistent with the tidyverse sintax.