class_docstr: Base class for ``ModelFrame`` and ``ModelFrame``
class_docstr_tok: ["Base","class","for","``","ModelFrame","``","and","``","ModelFrame","``"]
code: def transform(self, estimator, *args, **kwargs):
      if isinstance(estimator, compat.string_types):
          # transform using patsy
          return misc.transform_with_patsy(
              estimator, self, *args, **kwargs
          )
  
      # whether to delegate _AccessorMethods.transform
      mapped = self._get_method_mapper(estimator, "transform")
      if mapped is not None:
          result = mapped(self, estimator, *args, **kwargs)
          # save estimator when succeeded
          self.estimator = estimator
          return result
  
      transformed = self._call(estimator, "transform", *args, **kwargs)
      return self._wrap_transform(transformed)
  
imports: import warnings
  import pandas.compat
  import pandas_ml.misc
  from pandas_ml.compat import Appender
label_desc: Use image node_id 5 for calling the ModelTransformer obj's underlying member method code with example usage: obj.transform(estimator) and returns: self, misc, result