class_docstr: Onehot (or dummy) coding for categorical features, produces one feature per category, each binary.
  
  Parameters
  ----------
  
  verbose: int
      integer indicating verbosity of the output. 0 for none.
  cols: list
      a list of columns to encode, if None, all string columns will be encoded.
  drop_invariant: bool
      boolean for whether or not to drop columns with 0 variance.
  return_df: bool
      boolean for whether to return a pandas DataFrame from transform (otherwise it will be a numpy array).
  use_cat_names: bool
      if True, category values will be included in the encoded column names. Since this can result in duplicate column names, duplicates are suffixed with '#' symbol until a unique name is generated.
      If False, category indices will be used instead of the category values.
  handle_unknown: str
      options are 'error', 'return_nan', 'value', and 'indicator'. The default is 'value'.
  
      'error' will raise a `ValueError` at transform time if there are new categories.
      'return_nan' will encode a new value as `np.nan` in every dummy column.
      'value' will encode a new value as 0 in every dummy column.
      'indicator' will add an additional dummy column (in both training and test data).
  handle_missing: str
      options are 'error', 'return_nan', 'value', and 'indicator'. The default is 'value'.
  
      'error' will raise a `ValueError` if missings are encountered.
      'return_nan' will encode a missing value as `np.nan` in every dummy column.
      'value' will encode a missing value as 0 in every dummy column.
      'indicator' will treat missingness as its own category, adding an additional dummy column
      (whether there are missing values in the training set or not).
      'ignore' will encode missing values as 0 in every dummy column, NOT adding an additional category.
      
  
  Example
  -------
  >>> from category_encoders import *
  >>> import pandas as pd
  >>> from sklearn.datasets import fetch_openml
  >>> bunch = fetch_openml(name="house_prices", as_frame=True)
  >>> display_cols = ["Id", "MSSubClass", "MSZoning", "LotFrontage", "YearBuilt", "Heating", "CentralAir"]
  >>> y = bunch.target
  >>> X = pd.DataFrame(bunch.data, columns=bunch.feature_names)[display_cols]
  >>> enc = OneHotEncoder(cols=['CentralAir', 'Heating'], handle_unknown='indicator').fit(X, y)
  >>> numeric_dataset = enc.transform(X)
  >>> print(numeric_dataset.info())
  <class 'pandas.core.frame.DataFrame'>
  RangeIndex: 1460 entries, 0 to 1459
  Data columns (total 15 columns):
   #   Column         Non-Null Count  Dtype  
  ---  ------         --------------  -----  
   0   Id             1460 non-null   float64
   1   MSSubClass     1460 non-null   float64
   2   MSZoning       1460 non-null   object 
   3   LotFrontage    1201 non-null   float64
   4   YearBuilt      1460 non-null   float64
   5   Heating_1      1460 non-null   int64  
   6   Heating_2      1460 non-null   int64  
   7   Heating_3      1460 non-null   int64  
   8   Heating_4      1460 non-null   int64  
   9   Heating_5      1460 non-null   int64  
   10  Heating_6      1460 non-null   int64  
   11  Heating_-1     1460 non-null   int64  
   12  CentralAir_1   1460 non-null   int64  
   13  CentralAir_2   1460 non-null   int64  
   14  CentralAir_-1  1460 non-null   int64  
  dtypes: float64(4), int64(10), object(1)
  memory usage: 171.2+ KB
  None
  
  References
  ----------
  
  .. [1] Contrast Coding Systems for Categorical Variables, from
  https://stats.idre.ucla.edu/r/library/r-library-contrast-coding-systems-for-categorical-variables/
  
  .. [2] Gregory Carey (2003). Coding Categorical Variables, from
  http://ibgwww.colorado.edu/~carey/p5741ndir/Coding_Categorical_Variables.pdf
code: def __init__(
      self,
      verbose=0,
      cols=None,
      drop_invariant=False,
      return_df=True,
      handle_missing="value",
      handle_unknown="value",
      use_cat_names=False,
  ):
      super().__init__(
          verbose=verbose,
          cols=cols,
          drop_invariant=drop_invariant,
          return_df=return_df,
          handle_unknown=handle_unknown,
          handle_missing=handle_missing,
      )
      self.mapping = None
      self.ordinal_encoder = None
      self.use_cat_names = use_cat_names
  
file_path: category_encoders/category_encoders/one_hot.py
imports: import numpy
  import pandas
  import warnings
  from category_encoders.ordinal import OrdinalEncoder
  import category_encoders.utils
label_desc: Use image node_id 1 to create a new OneHotEncoder object from inherited base classes: util, util with example: obj = OneHotEncoder(verbose, cols, drop_invariant, return_df, handle_missing, handle_unknown, use_cat_names)