@staticmethod<EOL><INDENT>def _dispatch(name, *args, **kwargs):<DEDENT>
def outer(self, *args, **kwargs):<EOL><INDENT>def f(x):<EOL><INDENT>x = self._shallow_copy(x, groupby=self._groupby)<EOL>return getattr(x, name)(*args, **kwargs)<EOL><DEDENT>return self._groupby.apply(f)<EOL><DEDENT>outer.__name__ = name<EOL>return outer<EOL>
Dispatch to apply.