-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN remove unreachable code in pandas/core/groupby/generic.py::DataFrameGroupBy::_wrap_applied_output #33478
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
Comments
Hello @MarcoGorelli, I would like to work on this, can you elaborate 1 point that needs to be done. |
I think the first steps are to look at the _transform_general function and see how it could be broken down in more manageable/reusable functions. Might be quite a challenging good first issue - but feel free to give it a shot and let us know if you have any questions |
Yes, that's right - first step would be to break down this long function into smaller parts. After that (as a separate PR) you could simply remove the unused
True - but yes, do feel free to ask questions, and refer to the contributing guide for how to get started |
Ok @MarcoGorelli, I will try my best 😄 |
hey @sarthakchaudhary13 are you still working on this? if you are busy and don't have time for this issue anymore I would like to pick it up. Let me know 😄
@MarcoGorelli here you have mentioned this else block as a part of the I also went through your closed PR and noticed that most of the refactoring has been done Thanks. |
@Sylfrena yes, you're right, it's in |
hello @Sylfrena, Yeah sure give it a go 😃 |
Hey everyone, I can gladly take responsibility for this issue if @Sylfrena hasn't finished yet. I am currently setting up my developer env, but will follow up here when I finish to see if this needs to be resolved. Thanks |
Hi @kehv1n - TBH, given the silence, I'd assume nobody is working on it, so if you'd like to submit a PR it'd be welcome. Feel free to ask on the gitter channel if you have any issues setting up your development environment |
@kehv1n yes, please go ahead with the issue. |
take |
I apologize for the delay, question. @MarcoGorelli originally mentioned refactoring portions of Including the unreachable First time contributing, I apologize for the confusion. |
Hi @kehv1n - yes, that's right! Feel free to ping if you're stuck on something |
Hi @kehv1n are you still working this? I'd like to help out if I can |
@FollowTheProcess given the silence you're probably OK to take this if you want to work on it |
@MarcoGorelli Thanks! I've removed the unreached else and no change in local tests before/after. The tidying of the enclosing function might take be a bit longer, I'm not entirely sure how to do anything helpful with it! I'll keep playing. In the meantime would it be a good idea to do (my first ever) PR for the removal of the unreached else? |
@FollowTheProcess sure, if it's your first contribution maybe it's easier to just remove the unused |
@MarcoGorelli Cool, thanks for the help! I'll do the PR now |
I didn't mean to say it would close the issue! sorry, didn't realise it would do that automatically if I typed in the issue number |
Sounds like the refactoring part of this is still to be done. I can take a look if no one is working on it anymore. |
Hi @fokoid , thanks for bringing my attention back to this - it looks like @rhshadrach has already done some excellent refactoring here, this function is now significantly simpler than it was when I opened this, so IMO we're OK to close Nonetheless, there are many open issues to work on, any help there would be welcome! |
NOTE: I'd originally opened a PR to address this, but am now busy with other obligations + other PRs to respond to. So I'm opening it up as a good first issue for now, and will return to work on it if nobody takes it.
In
pandas/core/groupby/generic.py::DataFrameGroupBy::_wrap_applied_output
, it seems this branch is never reached:Two things need to be done here:
_wrap_applied_output
by making a helper function out of some of its internals (it's currently very long, and changes are hard to review)else
branchThe text was updated successfully, but these errors were encountered: