docstr: Check that X is dataframe, and y a binary series with values 0 and 1.
docstr_tok: ["Check","that","X","is","dataframe",",","and","y","a","binary","series","with","values","0","and","1","."]
code: def _check_fit_input(self, X: pd.DataFrame, y: pd.Series):
      """
      Check that X is dataframe, and y a binary series with values 0 and 1.
      """
      X, y = check_X_y(X, y)
  
      # check that y is binary
      if y.nunique() != 2:
          raise ValueError(
              "This encoder is designed for binary classification. The target "
              "used has more than 2 unique values."
          )
  
      # if target does not have values 0 and 1, we need to remap, to be able to
      # compute the averages.
      if y.min() != 0 or y.max() != 1:
          y = pd.Series(np.where(y == y.min(), 0, 1))
      return X, y
  
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 _ignore_format_docstring, _unseen_docstring, _variables_categorical_docstring
  from feature_engine._docstrings.methods import _fit_transform_docstring, _inverse_transform_docstring, _transform_encoders_docstring
  from feature_engine._docstrings.substitute import Substitution
  from feature_engine.dataframe_checks import check_X_y
  from feature_engine.encoding._helper_functions import check_parameter_unseen
  from feature_engine.encoding.base_encoder import CategoricalInitMixin, CategoricalMethodsMixin
  from feature_engine.tags import _return_tags
label_desc: Use image node_id 1 for calling the WoE obj's underlying member method code with example usage: obj._check_fit_input(X, y) and returns: X,  y