class_docstr: Abstract class for transformers that transform one dataset into another.
  
  .. versionadded:: 1.3.0
docstr: Transforms the input dataset with optional parameters.
  
  .. versionadded:: 1.3.0
  
  Parameters
  ----------
  dataset : :py:class:`pyspark.sql.DataFrame`
      input dataset
  params : dict, optional
      an optional param map that overrides embedded params.
  
  Returns
  -------
  :py:class:`pyspark.sql.DataFrame`
      transformed dataset
docstr_tok: ["Transforms","the","input","dataset","with","optional","parameters",".","..","versionadded",":",":","1.3.0","Parameters","--","--","--","--","--","dataset",":",":","py",":","class",":","`","pyspark.sql.DataFrame","`","input","dataset","params",":","dict",",","optional","an","optional","param","map","that","overrides","embedded","params",".","Returns","--","--","--","-",":","py",":","class",":","`","pyspark.sql.DataFrame","`","transformed","dataset"]
code: def transform(
      self, dataset: DataFrame, params: Optional["ParamMap"] = None
  ) -> DataFrame:
      """
      Transforms the input dataset with optional parameters.
  
      .. versionadded:: 1.3.0
  
      Parameters
      ----------
      dataset : :py:class:`pyspark.sql.DataFrame`
          input dataset
      params : dict, optional
          an optional param map that overrides embedded params.
  
      Returns
      -------
      :py:class:`pyspark.sql.DataFrame`
          transformed dataset
      """
      if params is None:
          params = dict()
      if isinstance(params, dict):
          if params:
              return self.copy(params)._transform(dataset)
          else:
              return self._transform(dataset)
      else:
          raise TypeError(
              "Params must be a param map but got %s." % type(params)
          )
  
imports: from abc import ABCMeta, abstractmethod
  import copy
  import threading
  from typing import Any, Callable, Generic, Iterator, List, Optional, Sequence, Tuple, TypeVar, Union, cast, overload, TYPE_CHECKING
  from pyspark import since
  from pyspark.ml.param import P
  from pyspark.ml.common import inherit_doc
  from pyspark.ml.param.shared import HasInputCol, HasOutputCol, HasLabelCol, HasFeaturesCol, HasPredictionCol, Params
  from pyspark.sql.dataframe import DataFrame
  from pyspark.sql.functions import udf
  from pyspark.sql.types import DataType, StructField, StructType
label_desc: Use image node_id 2 for calling the Transformer obj's underlying member method code with example usage: obj.transform(dataset, params) and returns: self, self