class_docstr: Shared set-up checks and methods across selectors.
  
  Parameters
  ----------
  confirm_variables: bool, default=False
      If set to True, variables that are not present in the input dataframe will be
      removed from the indicated list of variables. See parameter variables for more
      details.
  
  Methods
  -------
  transform:
      Remove non-selected features.
  
  _confirm_variables:
      Check that the variables entered by the user exist in the df.
class_docstr_tok: ["Shared","set-up","checks","and","methods","across","selectors",".","Parameters","--","--","--","--","--","confirm_variables",":","bool",",","default=False","If","set","to","True",",","variables","that","are","not","present","in","the","input","dataframe","will","be","removed","from","the","indicated","list","of","variables",".","See","parameter","variables","for","more","details",".","Methods","--","--","--","-","transform",":","Remove","non-selected","features",".","_confirm_variables",":","Check","that","the","variables","entered","by","the","user","exist","in","the","df","."]
docstr: Return dataframe with selected features.
  
  Parameters
  ----------
  X: pandas dataframe of shape = [n_samples, n_features].
      The input dataframe.
  
  Returns
  -------
  X_new: pandas dataframe of shape = [n_samples, n_selected_features]
      Pandas dataframe with the selected features.
docstr_tok: ["Return","dataframe","with","selected","features",".","Parameters","--","--","--","--","--","X",":","pandas","dataframe","of","shape","=","[","n_samples",",","n_features","]",".","The","input","dataframe",".","Returns","--","--","--","-","X_new",":","pandas","dataframe","of","shape","=","[","n_samples",",","n_selected_features","]","Pandas","dataframe","with","the","selected","features","."]
code: def transform(self, X: pd.DataFrame) -> pd.DataFrame:
      """
      Return dataframe with selected features.
  
      Parameters
      ----------
      X: pandas dataframe of shape = [n_samples, n_features].
          The input dataframe.
  
      Returns
      -------
      X_new: pandas dataframe of shape = [n_samples, n_selected_features]
          Pandas dataframe with the selected features.
      """
  
      # check if fit is performed prior to transform
      check_is_fitted(self)
  
      # check if input is a dataframe
      X = check_X(X)
  
      # check if number of columns in test dataset matches to train dataset
      _check_X_matches_training_df(X, self.n_features_in_)
  
      # reorder df to match train set
      X = X[self.feature_names_in_]
  
      # return the dataframe with the selected features
      return X.drop(columns=self.features_to_drop_)
  
imports: import numpy
  import pandas
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.utils.validation import check_is_fitted
  from feature_engine._base_transformers.mixins import GetFeatureNamesOutMixin
  from feature_engine._variable_handling.variable_type_selection import _filter_out_variables_not_in_dataframe
  from feature_engine.dataframe_checks import _check_X_matches_training_df, check_X
  from feature_engine.tags import _return_tags
label_desc: Use image node_id 2 for calling the BaseSelector obj's underlying member method code with example usage: obj.transform(X) and returns: X