-
Notifications
You must be signed in to change notification settings - Fork 78
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
ENH: add Graph.apply, Graph.aggregate and allow callable as transformation in transform #676
Conversation
great implementation! two small thoughts
|
So apply |
I agree on the "potentially confusing" part and think 2 distinct methods might be a good idea. |
nice. two quick reactions
|
I believe that both things are useful. Manual manipulation as well as both options of apply discussed above. I'll be reusing this code often and it is better to have a tested implementation I can just use than writing groupby from scratch every time. You're right about the implementation though the outcome will be the same :). But I'll change that. |
Actually not because |
@ljwolf what about including this alongside def aggregate(self, func):
return self._adjacency.groupby(level=0).agg(func) And we should probably also allow callable as transformation within |
Fine with that! |
Added |
It will need some examples but that applies to the rest of Graph as well :). |
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.
looks good to me!
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.
sweet
Closes #675