def _apply(self, func, name, window=None, center=None,<EOL>check_minp=None, **kwargs):
def f(x, name=name, *args):<EOL><INDENT>x = self._shallow_copy(x)<EOL>if isinstance(name, str):<EOL><INDENT>return getattr(x, name)(*args, **kwargs)<EOL><DEDENT>return x.apply(name, *args, **kwargs)<EOL><DEDENT>return self._groupby.apply(f)<EOL>
Dispatch to apply; we are stripping all of the _apply kwargs and
performing the original function call on the grouped object.