def __init__(self, verbose=0, cols=None, drop_invariant=False, return_df=True, handle_unknown=None, handle_missing='count', min_group_size=None, combine_min_nan_groups=True, min_group_name=None, normalize=False):
    'Count encoding for categorical features.\n\n        For a given categorical feature, replace the names of the groups\n        with the group counts.\n\n        Parameters\n        ----------\n\n        verbose: int\n            integer indicating verbosity of output. 0 for none.\n        cols: list\n            a list of columns to encode, if None, all string and categorical columns\n            will be encoded.\n        drop_invariant: bool\n            boolean for whether or not to drop columns with 0 variance.\n        return_df: bool\n            boolean for whether to return a pandas DataFrame from transform\n            (otherwise it will be a numpy array).\n        handle_missing: str\n            how to handle missing values at fit time. Options are \'error\', \'return_nan\',\n            and \'count\'. Default \'count\', which treat NaNs as a countable category at\n            fit time.\n        handle_unknown: str, int or dict of.\n            how to handle unknown labels at transform time. Options are \'error\'\n            \'return_nan\' and an int. Defaults to None which uses NaN behaviour\n            specified at fit time. Passing an int will fill with this int value.\n        normalize: bool or dict of.\n            whether to normalize the counts to the range (0, 1). See Pandas `value_counts`\n            for more details.\n        min_group_size: int, float or dict of.\n            the minimal count threshold of a group needed to ensure it is not\n            combined into a "leftovers" group. If float in the range (0, 1),\n            `min_group_size` is calculated as int(X.shape[0] * min_group_size).\n            Note: This value may change type based on the `normalize` variable. If True\n            this will become a float. If False, it will be an int.\n        min_group_name: None, str or dict of.\n            Set the name of the combined minimum groups when the defaults become\n            too long. Default None. In this case the category names will be joined\n            alphabetically with a `_` delimiter.\n            Note: The default name can be long ae may keep changing, for example, \n            in cross-validation.\n        combine_min_nan_groups: bool or dict of.\n            whether to combine the leftovers group with NaN group. Default True. Can\n            also be forced to combine with \'force\' meaning small groups are effectively\n            counted as NaNs. Force can only used when \'handle_missing\' is \'count\' or \'error\'.\n\n\n        Example\n        -------\n        >>> import pandas as pd\n        >>> from sklearn.datasets import load_boston\n        >>> from category_encoders import CountEncoder\n\n        >>> bunch = load_boston()\n        >>> y = bunch.target\n        >>> X = pd.DataFrame(bunch.data, columns=bunch.feature_names)\n        >>> enc = CountEncoder(cols=[\'CHAS\', \'RAD\']).fit(X, y)\n        >>> numeric_dataset = enc.transform(X)\n\n        >>> print(numeric_dataset.info())\n        <class \'pandas.core.frame.DataFrame\'>\n        RangeIndex: 506 entries, 0 to 505\n        Data columns (total 13 columns):\n        CRIM       506 non-null float64\n        ZN         506 non-null float64\n        INDUS      506 non-null float64\n        CHAS       506 non-null int64\n        NOX        506 non-null float64\n        RM         506 non-null float64\n        AGE        506 non-null float64\n        DIS        506 non-null float64\n        RAD        506 non-null int64\n        TAX        506 non-null float64\n        PTRATIO    506 non-null float64\n        B          506 non-null float64\n        LSTAT      506 non-null float64\n        dtypes: float64(11), int64(2)\n        memory usage: 51.5 KB\n        None\n\n        References\n        ----------\n\n        '
    self.return_df = return_df
    self.drop_invariant = drop_invariant
    self.drop_cols = []
    self.verbose = verbose
    self.cols = cols
    self._dim = None
    self.mapping = None
    self.handle_unknown = handle_unknown
    self.handle_missing = handle_missing
    self.normalize = normalize
    self.min_group_size = min_group_size
    self.min_group_name = min_group_name
    self.combine_min_nan_groups = combine_min_nan_groups
    self._min_group_categories = {}
    self._normalize = {}
    self._min_group_name = {}
    self._combine_min_nan_groups = {}
    self._min_group_size = {}
    self._handle_unknown = {}
    self._handle_missing = {}
Count encoding for categorical features.

For a given categorical feature, replace the names of the groups
with the group counts.

Parameters
----------

verbose: int
    integer indicating verbosity of output. 0 for none.
cols: list
    a list of columns to encode, if None, all string and categorical 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).
handle_missing: str
    how to handle missing values at fit time. Options are 'error', 'return_nan',
    and 'count'. Default 'count', which treat NaNs as a countable category at
    fit time.
handle_unknown: str, int or dict of.
    how to handle unknown labels at transform time. Options are 'error'
    'return_nan' and an int. Defaults to None which uses NaN behaviour
    specified at fit time. Passing an int will fill with this int value.
normalize: bool or dict of.
    whether to normalize the counts to the range (0, 1). See Pandas `value_counts`
    for more details.
min_group_size: int, float or dict of.
    the minimal count threshold of a group needed to ensure it is not
    combined into a "leftovers" group. If float in the range (0, 1),
    `min_group_size` is calculated as int(X.shape[0] * min_group_size).
    Note: This value may change type based on the `normalize` variable. If True
    this will become a float. If False, it will be an int.
min_group_name: None, str or dict of.
    Set the name of the combined minimum groups when the defaults become
    too long. Default None. In this case the category names will be joined
    alphabetically with a `_` delimiter.
    Note: The default name can be long ae may keep changing, for example, 
    in cross-validation.
combine_min_nan_groups: bool or dict of.
    whether to combine the leftovers group with NaN group. Default True. Can
    also be forced to combine with 'force' meaning small groups are effectively
    counted as NaNs. Force can only used when 'handle_missing' is 'count' or 'error'.


Example
-------
>>> import pandas as pd
>>> from sklearn.datasets import load_boston
>>> from category_encoders import CountEncoder

>>> bunch = load_boston()
>>> y = bunch.target
>>> X = pd.DataFrame(bunch.data, columns=bunch.feature_names)
>>> enc = CountEncoder(cols=['CHAS', 'RAD']).fit(X, y)
>>> numeric_dataset = enc.transform(X)

>>> print(numeric_dataset.info())
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 506 entries, 0 to 505
Data columns (total 13 columns):
CRIM       506 non-null float64
ZN         506 non-null float64
INDUS      506 non-null float64
CHAS       506 non-null int64
NOX        506 non-null float64
RM         506 non-null float64
AGE        506 non-null float64
DIS        506 non-null float64
RAD        506 non-null int64
TAX        506 non-null float64
PTRATIO    506 non-null float64
B          506 non-null float64
LSTAT      506 non-null float64
dtypes: float64(11), int64(2)
memory usage: 51.5 KB
None

References
----------
def __init__(self, verbose=0, cols=None, drop_invariant=False, return_df=True, handle_unknown=None, handle_missing='count', min_group_size=None, combine_min_nan_groups=True, min_group_name=None, normalize=False):
    'Count encoding for categorical features.\n\n        For a given categorical feature, replace the names of the groups\n        with the group counts.\n\n        Parameters\n        ----------\n\n        verbose: int\n            integer indicating verbosity of output. 0 for none.\n        cols: list\n            a list of columns to encode, if None, all string and categorical columns\n            will be encoded.\n        drop_invariant: bool\n            boolean for whether or not to drop columns with 0 variance.\n        return_df: bool\n            boolean for whether to return a pandas DataFrame from transform\n            (otherwise it will be a numpy array).\n        handle_missing: str\n            how to handle missing values at fit time. Options are \'error\', \'return_nan\',\n            and \'count\'. Default \'count\', which treat NaNs as a countable category at\n            fit time.\n        handle_unknown: str, int or dict of.\n            how to handle unknown labels at transform time. Options are \'error\'\n            \'return_nan\' and an int. Defaults to None which uses NaN behaviour\n            specified at fit time. Passing an int will fill with this int value.\n        normalize: bool or dict of.\n            whether to normalize the counts to the range (0, 1). See Pandas `value_counts`\n            for more details.\n        min_group_size: int, float or dict of.\n            the minimal count threshold of a group needed to ensure it is not\n            combined into a "leftovers" group. If float in the range (0, 1),\n            `min_group_size` is calculated as int(X.shape[0] * min_group_size).\n            Note: This value may change type based on the `normalize` variable. If True\n            this will become a float. If False, it will be an int.\n        min_group_name: None, str or dict of.\n            Set the name of the combined minimum groups when the defaults become\n            too long. Default None. In this case the category names will be joined\n            alphabetically with a `_` delimiter.\n            Note: The default name can be long ae may keep changing, for example, \n            in cross-validation.\n        combine_min_nan_groups: bool or dict of.\n            whether to combine the leftovers group with NaN group. Default True. Can\n            also be forced to combine with \'force\' meaning small groups are effectively\n            counted as NaNs. Force can only used when \'handle_missing\' is \'count\' or \'error\'.\n\n\n        Example\n        -------\n        >>> import pandas as pd\n        >>> from sklearn.datasets import load_boston\n        >>> from category_encoders import CountEncoder\n\n        >>> bunch = load_boston()\n        >>> y = bunch.target\n        >>> X = pd.DataFrame(bunch.data, columns=bunch.feature_names)\n        >>> enc = CountEncoder(cols=[\'CHAS\', \'RAD\']).fit(X, y)\n        >>> numeric_dataset = enc.transform(X)\n\n        >>> print(numeric_dataset.info())\n        <class \'pandas.core.frame.DataFrame\'>\n        RangeIndex: 506 entries, 0 to 505\n        Data columns (total 13 columns):\n        CRIM       506 non-null float64\n        ZN         506 non-null float64\n        INDUS      506 non-null float64\n        CHAS       506 non-null int64\n        NOX        506 non-null float64\n        RM         506 non-null float64\n        AGE        506 non-null float64\n        DIS        506 non-null float64\n        RAD        506 non-null int64\n        TAX        506 non-null float64\n        PTRATIO    506 non-null float64\n        B          506 non-null float64\n        LSTAT      506 non-null float64\n        dtypes: float64(11), int64(2)\n        memory usage: 51.5 KB\n        None\n\n        References\n        ----------\n\n        '
    self.return_df = return_df
    self.drop_invariant = drop_invariant
    self.drop_cols = []
    self.verbose = verbose
    self.cols = cols
    self._dim = None
    self.mapping = None
    self.handle_unknown = handle_unknown
    self.handle_missing = handle_missing
    self.normalize = normalize
    self.min_group_size = min_group_size
    self.min_group_name = min_group_name
    self.combine_min_nan_groups = combine_min_nan_groups
    self._min_group_categories = {}
    self._normalize = {}
    self._min_group_name = {}
    self._combine_min_nan_groups = {}
    self._min_group_size = {}
    self._handle_unknown = {}
    self._handle_missing = {}