class_docstr: The Winsorizer() caps maximum and/or minimum values of a variable at automatically
  determined values, and optionally adds indicators.
  
  {intro_docstring}
  
  The Winsorizer() works only with numerical variables. A list of variables can
  be indicated. Alternatively, the Winsorizer() will select and cap all numerical
  variables in the train set.
  
  The transformer first finds the values at one or both tails of the distributions
  (fit). The transformer then caps the variables (transform).
  
  More details in the :ref:`User Guide <winsorizer>`.
  
  Parameters
  ----------
  {capping_method}
  
  {tail}
  
  {fold}
  
  add_indicators: bool, default=False
      Whether to add indicator variables to flag the capped outliers.
      If 'True', binary variables will be added to flag outliers on the left and right
      tails of the distribution. One binary variable per tail, per variable.
  
  {variables}
  
  {missing_values}
  
  Attributes
  ----------
  {right_tail_caps_}
  
  {left_tail_caps_}
  
  {variables_}
  
  {feature_names_in_}
  
  {n_features_in_}
  
  Methods
  -------
  fit:
      Learn the values that will replace the outliers.
  
  {fit_transform}
  
  transform:
      Cap the variables.
class_docstr_tok: ["The","Winsorizer","(",")","caps","maximum","and\/or","minimum","values","of","a","variable","at","automatically","determined","values",",","and","optionally","adds","indicators",".","{","intro_docstring","}","The","Winsorizer","(",")","works","only","with","numerical","variables",".","A","list","of","variables","can","be","indicated",".","Alternatively",",","the","Winsorizer","(",")","will","select","and","cap","all","numerical","variables","in","the","train","set",".","The","transformer","first","finds","the","values","at","one","or","both","tails","of","the","distributions","(","fit",")",".","The","transformer","then","caps","the","variables","(","transform",")",".","More","details","in","the",":","ref",":","`","User","Guide","<","winsorizer",">","`",".","Parameters","--","--","--","--","--","{","capping_method","}","{","tail","}","{","fold","}","add_indicators",":","bool",",","default=False","Whether","to","add","indicator","variables","to","flag","the","capped","outliers",".","If","'True","'",",","binary","variables","will","be","added","to","flag","outliers","on","the","left","and","right","tails","of","the","distribution",".","One","binary","variable","per","tail",",","per","variable",".","{","variables","}","{","missing_values","}","Attributes","--","--","--","--","--","{","right_tail_caps_","}","{","left_tail_caps_","}","{","variables_","}","{","feature_names_in_","}","{","n_features_in_","}","Methods","--","--","--","-","fit",":","Learn","the","values","that","will","replace","the","outliers",".","{","fit_transform","}","transform",":","Cap","the","variables","."]
docstr: Adds names of outlier indicators to transformed variable names.
docstr_tok: ["Adds","names","of","outlier","indicators","to","transformed","variable","names","."]
code: def _add_new_feature_names(self, feature_names) -> List:
      """Adds names of outlier indicators to transformed variable names."""
      if self.add_indicators is True:
          feature_names = feature_names + self._get_new_features_name()
      return feature_names
  
file_path: feature_engine/feature_engine/outliers/winsorizer.py
imports: from typing import List, Union
  import numpy
  import pandas
  from feature_engine._docstrings.fit_attributes import _feature_names_in_docstring, _n_features_in_docstring, _variables_attribute_docstring
  from feature_engine._docstrings.init_parameters import _missing_values_docstring, _variables_numerical_docstring
  from feature_engine._docstrings.methods import _fit_transform_docstring
  from feature_engine._docstrings.substitute import Substitution
  from feature_engine.dataframe_checks import check_X
  from feature_engine.outliers.base_outlier import WinsorizerBase
label_desc: Use image node_id 4 for calling the Winsorizer obj's underlying member method code with example usage: obj._add_new_feature_names(feature_names) and returns: feature_names