class_docstr: The `DictMapper` transformer maps the values of columns according to the input `mapper` dictionary, fall back to
  the `default` value if the key is not present in the dictionary.
  
  Parameters
  ----------
  mapper : dict[..., int]
      The dictionary containing the mapping of the values.
  default : int
      The value to fall back to if the value is not in the mapper.
  
  Attributes
  ----------
  n_features_in_ : int
      Number of features seen during `fit`.
  dim_ : int
      Deprecated, please use `n_features_in_` instead.
docstr: Performs the mapping on the column(s) of `X`.
  
  Parameters
  ----------
  X : array-like of shape (n_samples, n_features)
      The data for which the mapping will be applied.
  
  Returns
  -------
  np.ndarray of shape (n_samples, n_features)
      The data with the mapping applied.
  
  Raises
  ------
  ValueError
      If the number of columns from `X` differs from the number of columns when fitting.
code: def transform(self, X):
      """Performs the mapping on the column(s) of `X`.
  
      Parameters
      ----------
      X : array-like of shape (n_samples, n_features)
          The data for which the mapping will be applied.
  
      Returns
      -------
      np.ndarray of shape (n_samples, n_features)
          The data with the mapping applied.
  
      Raises
      ------
      ValueError
          If the number of columns from `X` differs from the number of columns when fitting.
      """
      check_is_fitted(self, ["n_features_in_"])
      X = check_array(
          X,
          copy=True,
          estimator=self,
          force_all_finite=True,
          dtype=None,
          ensure_2d=True,
      )
  
      if X.shape[1] != self.n_features_in_:
          raise ValueError(
              f"number of columns {X.shape[1]} does not match fit size {self.n_features_in_}"
          )
      return np.vectorize(self.mapper.get, otypes=[int])(
          X, self.default
      )
  
file_path: scikit-lego/sklego/preprocessing/dictmapper.py
imports: from warnings import warn
  import numpy
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.utils import check_array
  from sklearn.utils.validation import check_is_fitted
label_desc: Use image node_id 3 for calling the DictMapper obj's underlying member method code with example usage: obj.transform(X) and returns: np