parameters: (
          self, f: F, data: FrameOrSeriesUnion
      )
return_statement: return self._wrap_applied_output(
              data, keys, values, not_indexed_same=mutated or self.mutated
          )
docstring: Apply function f in python space
  
          Parameters
          ----------
          f : callable
              Function to apply
          data : Series or DataFrame
              Data to apply f to
  
          Returns
          -------
          Series or DataFrame
              data after applying f
docstring_summary: Apply function f in python space
docstring_tokens: Apply function f in python space
function: def _python_apply_general(
          self, f: F, data: FrameOrSeriesUnion
      ) -> FrameOrSeriesUnion:
          """
          Apply function f in python space
  
          Parameters
          ----------
          f : callable
              Function to apply
          data : Series or DataFrame
              Data to apply f to
  
          Returns
          -------
          Series or DataFrame
              data after applying f
          """
          keys, values, mutated = self.grouper.apply(f, data, self.axis)
  
          return self._wrap_applied_output(
              data, keys, values, not_indexed_same=mutated or self.mutated
          )
function_tokens: def _python_apply_general ( self , f : F , data : FrameOrSeriesUnion ) -> FrameOrSeriesUnion : keys , values , mutated = self . grouper . apply ( f , data , self . axis ) return self . _wrap_applied_output ( data , keys , values , not_indexed_same = mutated or self . mutated )