class_docstr: Class for all standard transformation steps.
class_docstr_tok: ["Class","for","all","standard","transformation","steps","."]
docstr: Prepare the input data.
  
  Convert X and y to pandas (if not already) and perform standard
  compatibility checks (dimensions, length, indices, etc...).
  From https://github.com/tvdboom/ATOM/blob/master/atom/basetransformer.py#L211
  
  Parameters
  ----------
  X: dataframe-like
      Feature set with shape=(n_samples, n_features).
  
  y: int, str, sequence or None, optional (default=None)
      - If None: y is ignored.
      - If int: Index of the target column in X.
      - If str: Name of the target column in X.
      - Else: Target column with shape=(n_samples,).
docstr_tok: ["Prepare","the","input","data",".","Convert","X","and","y","to","pandas","(","if","not","already",")","and","perform","standard","compatibility","checks","(","dimensions",",","length",",","indices",",","etc","...",")",".","From","https",":","\/\/github.com\/tvdboom\/ATOM\/blob\/master\/atom\/basetransformer.py","#","L211","Parameters","--","--","--","--","--","X",":","dataframe-like","Feature","set","with","shape=","(","n_samples",",","n_features",")",".","y",":","int",",","str",",","sequence","or","None",",","optional","(","default=None",")","-","If","None",":","y","is","ignored",".","-","If","int",":","Index","of","the","target","column","in","X",".","-","If","str",":","Name","of","the","target","column","in","X",".","-","Else",":","Target","column","with","shape=","(","n_samples",",",")","."]
code: def _prepare_dataset(self, X, y=None):
      """Prepare the input data.
  
      Convert X and y to pandas (if not already) and perform standard
      compatibility checks (dimensions, length, indices, etc...).
      From https://github.com/tvdboom/ATOM/blob/master/atom/basetransformer.py#L211
  
      Parameters
      ----------
      X: dataframe-like
          Feature set with shape=(n_samples, n_features).
  
      y: int, str, sequence or None, optional (default=None)
          - If None: y is ignored.
          - If int: Index of the target column in X.
          - If str: Name of the target column in X.
          - Else: Target column with shape=(n_samples,).
  
      """
      self.logger.info("Set up data.")
  
      # Make copy to not overwrite mutable arguments
      X = to_df(deepcopy(X))
  
      # No duplicate column names are allowed
      if len(set(X.columns)) != len(X.columns):
          raise ValueError("Duplicate column names found in X.")
  
      # Prepare target column
      if isinstance(y, (list, tuple, np.ndarray, pd.Series)):
          if not isinstance(y, pd.Series):
              # Check that y is one-dimensional
              ndim = np.array(y).ndim
              if ndim != 1:
                  raise ValueError(
                      f"y should be one-dimensional, got ndim={ndim}."
                  )
  
              # Check X and y have the same number of rows
              if len(X) != len(y):
                  raise ValueError(
                      "X and y don't have the same number of rows,"
                      f" got len(X)={len(X)} and len(y)={len(y)}."
                  )
  
              y = to_series(y, index=X.index)
  
          elif not X.index.equals(y.index):
              raise ValueError("X and y don't have the same indices!")
  
      elif isinstance(y, str):
          if y not in X.columns:
              raise ValueError(
                  "Invalid value for the target parameter. "
                  f"Column {y} not found in the data."
              )
  
          X, y = X.drop(y, axis=1), X[y]
  
      elif isinstance(y, int):
          X, y = X.drop(X.columns[y], axis=1), X[X.columns[y]]
  
      else:  # y=None
          return df_shrink_dtypes(X)
  
      # Check that y has no missing values
      if y.isna().any():
          raise ValueError(
              f"{y.isna().sum()} missing values found in the target column: "
              f"{y.name}. To proceed, remove the respective rows from the data. "
          )
  
      return df_shrink_dtypes(
          X.merge(y.to_frame(), left_index=True, right_index=True)
      )
  
imports: from copy import deepcopy
  import numpy
  import pandas
  from category_encoders.basen import BaseNEncoder
  from category_encoders.one_hot import OneHotEncoder
  from category_encoders.ordinal import OrdinalEncoder
  from category_encoders.target_encoder import TargetEncoder
  from imblearn.combine import SMOTEENN, SMOTETomek
  from imblearn.over_sampling import ADASYN, SMOTE, SMOTEN, SMOTENC, SVMSMOTE, BorderlineSMOTE, KMeansSMOTE, RandomOverSampler
  from imblearn.under_sampling import AllKNN, CondensedNearestNeighbour, EditedNearestNeighbours, InstanceHardnessThreshold, NearMiss, NeighbourhoodCleaningRule, OneSidedSelection, RandomUnderSampler, RepeatedEditedNearestNeighbours, TomekLinks
  from sklearn.decomposition import PCA, IncrementalPCA, KernelPCA
  from sklearn.feature_selection import SelectFromModel, SelectKBest, SequentialFeatureSelector, VarianceThreshold, f_classif, f_regression
  from sklearn.impute import KNNImputer, SimpleImputer
  from sklearn.model_selection import GroupKFold, KFold, StratifiedKFold, TimeSeriesSplit, train_test_split
  from sklearn.preprocessing import KBinsDiscretizer, LabelEncoder, MaxAbsScaler, MinMaxScaler, PolynomialFeatures, PowerTransformer, QuantileTransformer, RobustScaler, StandardScaler
  from pycaret.containers.models.classification import get_all_model_containers
  from pycaret.containers.models.regression import get_all_model_containers
  from pycaret.internal.preprocess.iterative_imputer import IterativeImputer
  from pycaret.internal.preprocess.transformers import CleanColumnNames, DropImputer, EmbedTextFeatures, ExtractDateTimeFeatures, FixImbalancer, GroupFeatures, RareCategoryGrouping, RemoveMulticollinearity, RemoveOutliers, TargetTransformer, TransformerWrapper, TransformerWrapperWithInverse
  from pycaret.utils.constants import SEQUENCE
  from pycaret.utils.generic import MLUsecase, check_features_exist, df_shrink_dtypes, get_columns_to_stratify_by, normalize_custom_transformers, to_df, to_series
label_desc: Use image node_id 1 for calling the Preprocessor obj's underlying member method code with example usage: obj._prepare_dataset(X, y) and returns: df_shrink_dtypes, df_shrink_dtypes