class_docstr: DropConstantFeatures() drops constant and quasi-constant variables from a dataframe.
  Constant variables show the same value in all the observations in the dataset.
  Quasi-constant variables show the same value in almost all the observations in the
  dataset.
  
  This transformer works with numerical and categorical variables. The user can
  indicate a list of variables to examine. Alternatively, the transformer will
  evaluate all the variables in the dataset.
  
  The transformer will first identify and store the constant and quasi-constant
  variables. Next, the transformer will drop these variables from a dataframe.
  
  More details in the :ref:`User Guide <drop_constant>`.
  
  Parameters
  ----------
  {variables}
  
  tol: float,int,  default=1
      Threshold to detect constant/quasi-constant features. Variables showing the
      same value in a percentage of observations greater than tol will be considered
      constant / quasi-constant and dropped. If tol=1, the transformer removes
      constant variables. Else, it will remove quasi-constant variables. For example,
      if tol=0.98, the transformer will remove variables that show the same value in
      98% of the observations.
  
  missing_values: str, default=raises
      Whether the missing values should be raised as error, ignored or included as an
      additional value of the variable. Takes values 'raise', 'ignore', 'include'.
  
  {confirm_variables}
  
  Attributes
  ----------
  features_to_drop_:
      List with constant and quasi-constant features.
  
  {variables_}:
  
  {feature_names_in_}
  
  {n_features_in_}
  
  Methods
  -------
  fit:
      Find constant and quasi-constant features.
  
  {fit_transform}
  
  {get_support}
  
  transform:
      Remove constant and quasi-constant features.
  
  Notes
  -----
  This transformer is a similar concept to the VarianceThreshold from Scikit-learn,
  but it evaluates number of unique values instead of variance.
  
  See Also
  --------
  sklearn.feature_selection.VarianceThreshold
code: def __init__(
      self,
      variables: Variables = None,
      tol: float = 1,
      missing_values: str = "raise",
      confirm_variables: bool = False,
  ):
      if (
          not isinstance(tol, (float, int))
          or isinstance(tol, bool)
          or tol < 0
          or tol > 1
      ):
          raise ValueError(
              "tol must be a float or integer between 0 and 1"
          )
  
      if missing_values not in ["raise", "ignore", "include"]:
          raise ValueError(
              "missing_values takes only values 'raise', 'ignore' or "
              "'include'."
          )
  
      super().__init__(confirm_variables)
  
      self.tol = tol
      self.variables = _check_init_parameter_variables(variables)
      self.missing_values = missing_values
  
file_path: feature_engine/feature_engine/selection/drop_constant_features.py
imports: from typing import List, Union
  import pandas
  from feature_engine._docstrings.fit_attributes import _feature_names_in_docstring, _n_features_in_docstring
  from feature_engine._docstrings.methods import _fit_transform_docstring
  from feature_engine._docstrings.substitute import Substitution
  from feature_engine._variable_handling.init_parameter_checks import _check_init_parameter_variables
  from feature_engine._variable_handling.variable_type_selection import _find_all_variables
  from feature_engine.dataframe_checks import _check_contains_na, check_X
  from feature_engine.selection._docstring import _get_support_docstring, _variables_all_docstring, _variables_attribute_docstring
  from feature_engine.selection.base_selector import BaseSelector
  from feature_engine.tags import _return_tags
label_desc: Use image node_id 1 to create a new DropConstantFeatures object from inherited base classes: BaseSelector with example: obj = DropConstantFeatures(variables, tol, missing_values, confirm_variables)