class_docstr: Removes degenerate (constant) columns.
  
  Parameters
  ----------
  drop_degenerate : `bool`, default False
      Whether to drop degenerate columns.
  
  Attributes
  ----------
  drop_cols : `list` [`str`] or None
      Degenerate columns to drop
  keep_cols : `list` [`str`] or None
      Columns to keep
class_docstr_tok: ["Removes","degenerate","(","constant",")","columns",".","Parameters","--","--","--","--","--","drop_degenerate",":","`","bool","`",",","default","False","Whether","to","drop","degenerate","columns",".","Attributes","--","--","--","--","--","drop_cols",":","`","list","`","[","`","str","`","]","or","None","Degenerate","columns","to","drop","keep_cols",":","`","list","`","[","`","str","`","]","or","None","Columns","to","keep"]
docstr: Identifies the degenerate columns, and sets ``self.keep_cols``
  and ``self.drop_cols``.
  
  Parameters
  ----------
  X : `pandas.DataFrame`
      Training input data. e.g. each column is a timeseries.
      Columns are expected to be numeric.
  y : None
      There is no need of a target in a transformer, yet the pipeline API
      requires this parameter.
  
  Returns
  -------
  self : object
      Returns self.
docstr_tok: ["Identifies","the","degenerate","columns",",","and","sets","``","self.keep_cols","``","and","``","self.drop_cols","``",".","Parameters","--","--","--","--","--","X",":","`","pandas.DataFrame","`","Training","input","data",".","e.g",".","each","column","is","a","timeseries",".","Columns","are","expected","to","be","numeric",".","y",":","None","There","is","no","need","of","a","target","in","a","transformer",",","yet","the","pipeline","API","requires","this","parameter",".","Returns","--","--","--","-","self",":","object","Returns","self","."]
code: def fit(self, X, y=None):
      """Identifies the degenerate columns, and sets ``self.keep_cols``
      and ``self.drop_cols``.
  
      Parameters
      ----------
      X : `pandas.DataFrame`
          Training input data. e.g. each column is a timeseries.
          Columns are expected to be numeric.
      y : None
          There is no need of a target in a transformer, yet the pipeline API
          requires this parameter.
  
      Returns
      -------
      self : object
          Returns self.
      """
      assert isinstance(X, pd.DataFrame)
      if self.drop_degenerate:
          self.keep_cols = list(
              X.loc[:, (X != X.iloc[0]).any()].columns
          )
          self.drop_cols = [
              col for col in X.columns if col not in self.keep_cols
          ]
      else:
          self.keep_cols = list(X.columns)
          self.drop_cols = []
  
      if self.drop_cols:
          warnings.warn(
              f"Columns {self.drop_cols} are degenerate (constant value), "
              f"and will not be used in the forecast.",
              RuntimeWarning,
          )
      return self
  
file_path: greykite/greykite/sklearn/transform/drop_degenerate_transformer.py
imports: import warnings
  import pandas
  from sklearn.base import BaseEstimator
  from sklearn.base import TransformerMixin
  from sklearn.exceptions import NotFittedError
label_desc: Use image node_id 2 for calling the DropDegenerateTransformer obj's underlying member method code with example usage: obj.fit(X, y) and returns: self