class_docstr: Class for categories features preprocessing: converting binary string features into integers. 
class_docstr_tok: ["Class","for","categories","features","preprocessing",":","converting","binary","string","features","into","integers","."]
docstr: Find indices of columns which are contains categorical values. Binary features and at the same time
  has str objects. If there are such features - convert it into int
docstr_tok: ["Find","indices","of","columns","which","are","contains","categorical","values",".","Binary","features","and","at","the","same","time","has","str","objects",".","If","there","are","such","features","-","convert","it","into","int"]
code: def fit(self, input_data: InputData):
      """
      Find indices of columns which are contains categorical values. Binary features and at the same time
      has str objects. If there are such features - convert it into int
      """
      feature_type_ids = input_data.supplementary_data.col_type_ids[
          "features"
      ]
      categorical_ids, _ = find_categorical_columns(
          input_data.features, feature_type_ids
      )
  
      binary_ids_to_convert = []
      for column_id, column in zip(
          categorical_ids, input_data.features[:, categorical_ids].T
      ):
          pd_column = pd.Series(column, name=column_id, copy=True)
          is_nan = pd_column.isna()
          column_nuniques = pd_column.nunique(dropna=False)
          if is_nan.sum():
              # This categorical column has nans
              pd_column[is_nan] = FEDOT_STR_NAN
  
              if column_nuniques <= 3:
                  # There is column with binary categories and gaps
                  self.binary_features_with_nans.append(column_id)
                  binary_ids_to_convert.append(column_id)
                  self._train_encoder(pd_column)
          elif column_nuniques <= 2:
              # Column contains binary string feature
              binary_ids_to_convert.append(column_id)
              # Train encoder for current column
              self._train_encoder(pd_column)
  
      self.binary_ids_to_convert = binary_ids_to_convert
      return self
  
file_path: FEDOT/fedot/preprocessing/categorical.py
imports: from copy import deepcopy
  import numpy
  import pandas
  from sklearn.preprocessing import LabelEncoder
  from fedot.core.data.data import InputData
  from fedot.core.data.data_preprocessing import find_categorical_columns
  from fedot.preprocessing.data_types import FEDOT_STR_NAN, TYPE_TO_ID
label_desc: Use image node_id 2 for calling the BinaryCategoricalPreprocessor obj's underlying member method code with example usage: obj.fit(input_data) and returns: self