docstr: Transforms the categorical columns specified to the trained neural embedding from the model.
  
  Args:
      X (DataFrame): DataFrame of features, shape (n_samples, n_features). Must contain columns to encode.
      y ([type], optional): Only for compatibility. Not used. Defaults to None.
  
  Raises:
      ValueError: [description]
  
  Returns:
      DataFrame: The encoded dataframe
docstr_tok: ["Transforms","the","categorical","columns","specified","to","the","trained","neural","embedding","from","the","model",".","Args",":","X","(","DataFrame",")",":","DataFrame","of","features",",","shape","(","n_samples",",","n_features",")",".","Must","contain","columns","to","encode",".","y","(","[","type","]",",","optional",")",":","Only","for","compatibility",".","Not","used",".","Defaults","to","None",".","Raises",":","ValueError",":","[","description","]","Returns",":","DataFrame",":","The","encoded","dataframe"]
code: def transform(self, X: DataFrame, y=None) -> DataFrame:
      """Transforms the categorical columns specified to the trained neural embedding from the model.
  
      Args:
          X (DataFrame): DataFrame of features, shape (n_samples, n_features). Must contain columns to encode.
          y ([type], optional): Only for compatibility. Not used. Defaults to None.
  
      Raises:
          ValueError: [description]
  
      Returns:
          DataFrame: The encoded dataframe
      """
      if not self._mapping:
          raise ValueError(
              "Passed model should either have an attribute `embeddng_layers`"
              " or a method `extract_embedding` defined for `transform`."
          )
      assert all(c in X.columns for c in self.cols)
  
      X_encoded = X.copy(deep=True)
      for col, mapping in track(
          self._mapping.items(),
          description="Encoding the data...",
          total=len(self._mapping.values()),
      ):
          for dim in range(mapping[self.NAN_CATEGORY].shape[0]):
              X_encoded.loc[:, f"{col}_embed_dim_{dim}"] = (
                  X_encoded[col]
                  .fillna(self.NAN_CATEGORY)
                  .map({k: v[dim] for k, v in mapping.items()})
              )
              # Filling unseen categories also with NAN Embedding
              X_encoded[f"{col}_embed_dim_{dim}"].fillna(
                  mapping[self.NAN_CATEGORY][dim], inplace=True
              )
      X_encoded.drop(columns=self.cols, inplace=True)
      return X_encoded
  
imports: from pandas import DataFrame, Series, unique
  import numpy
  from rich.progress import track
  from sklearn.base import BaseEstimator, TransformerMixin
  from pytorch_tabular.utils import get_logger
label_desc: Use image node_id 4 for calling the CategoricalEmbeddingTransformer obj's underlying member method code with example usage: obj.transform(X, y) and returns: X_encoded