#NEWLINE# def _apply( self , func , name , window = None , center = None , check_minp = None , how = None , **kwargs ) : #NEWLINE# #INDENT# '\n        dispatch to apply; we are stripping all of the _apply kwargs and\n        performing the original function call on the grouped object\n        ' #NEWLINE# def f( x , name = name , * args ) : #NEWLINE# #INDENT# x = self . _shallow_copy ( x ) #NEWLINE# if isinstance ( name , compat . string_types ) : #NEWLINE# #INDENT# return getattr ( x , name ) ( * args , ** kwargs ) #NEWLINE# #UNINDENT# return x . apply ( name , * args , ** kwargs ) #NEWLINE# #UNINDENT# return self . _groupby . apply ( f )