I failed this audit, which is kind of ridiculous. I voted to close the question, because it:
- really belongs on Programmers or Code Review, not Stack Overflow;
- is broad;
- is multi-part;
- doesn't describe a specific problem encountered by the user with specific code.
Problematic parts of the question:
The title:
What is pythonic way to do dt[,y:=myfun(x),by=list(a,b,c)] in R?
The first question, which asks for opinion-based code review:
Although the logic is quite clear, I am not 100% happy with it. Is there any better approach?
A vague tool recommendation/evaluation request, reflecting minimal effort or knowledge:
I am not very familiar with pandas. Does it help in such case?
And a "side question" which really belongs on Programmers or Code Review:
Side question: is there a category that my problem belongs to? aggregation? partition? window? This pattern happens so frequently in data analysis, there must be an existing name for it.
The OP provided code in both R and Python, true, but doesn't have a problem with that code; he just wanted a review and analysis of it. This should be a straightforward close, for any number of reasons.
Voting
by its nature means that it is soliciting an opinion, so I guess it is crazy to assume that all well meaning, competent reviewers will always vote in the same way. I don't really sweat with reviews, as hopefully there is some kind of comparison to a normal distribution curve in effect when it comes to failures.Voting
andvoting to close
are different things. This question was not even a close call. @psubsee2003: the point here isn't that the question could was on-topic for multiple sites; it's that the question was decidedly off-topic for SO.