code: def fit(self, X, y=None):
          
          X = self._check_array(X)
  
          if self.categories is not None:
              # some basic validation
              columns = pd.Index(self.categories)
              categories = self.categories
  
          elif isinstance(X, pd.DataFrame):
              columns, categories = self._fit(X)
          else:
              columns, categories = self._fit_dask(X)
  
          self.columns_ = columns
          self.categories_ = categories
          return self
docs: Find the categorical columns.
  
          Parameters
          ----------
          X : pandas.DataFrame or dask.DataFrame
          y : ignored
  
          Returns
          -------
          self