class_docstr: Plateau finder transformer.
  
  Transformer that finds segments of the same given value, plateau in
  the time series, and
  returns the starting indices and lengths.
  
  Parameters
  ----------
  value : {int, float, np.nan, np.inf}
      Value for which to find segments
  min_length : int
      Minimum lengths of segments with same value to include.
      If min_length is set to 1, the transformer can be used as a value
      finder.
class_docstr_tok: ["Plateau","finder","transformer",".","Transformer","that","finds","segments","of","the","same","given","value",",","plateau","in","the","time","series",",","and","returns","the","starting","indices","and","lengths",".","Parameters","--","--","--","--","--","value",":","{","int",",","float",",","np.nan",",","np.inf","}","Value","for","which","to","find","segments","min_length",":","int","Minimum","lengths","of","segments","with","same","value","to","include",".","If","min_length","is","set","to","1",",","the","transformer","can","be","used","as","a","value","finder","."]
docstr: Transform X.
  
  Parameters
  ----------
  X : nested pandas DataFrame of shape [n_samples, n_columns]
      Nested dataframe with time-series in cells.
  
  Returns
  -------
  Xt : pandas DataFrame
    Transformed pandas DataFrame
docstr_tok: ["Transform","X.","Parameters","--","--","--","--","--","X",":","nested","pandas","DataFrame","of","shape","[","n_samples",",","n_columns","]","Nested","dataframe","with","time-series","in","cells",".","Returns","--","--","--","-","Xt",":","pandas","DataFrame","Transformed","pandas","DataFrame"]
code: def _transform(self, X, y=None):
      """Transform X.
  
      Parameters
      ----------
      X : nested pandas DataFrame of shape [n_samples, n_columns]
          Nested dataframe with time-series in cells.
  
      Returns
      -------
      Xt : pandas DataFrame
        Transformed pandas DataFrame
      """
      # get column name
      column_name = X.columns[0]
  
      self._starts = []
      self._lengths = []
  
      # find plateaus (segments of the same value)
      for x in X.iloc[:, 0]:
          x = np.asarray(x)
  
          # find indices of transition
          if np.isnan(self.value):
              i = np.where(np.isnan(x), 1, 0)
  
          elif np.isinf(self.value):
              i = np.where(np.isinf(x), 1, 0)
  
          else:
              i = np.where(x == self.value, 1, 0)
  
          # pad and find where segments transition
          transitions = np.diff(np.hstack([0, i, 0]))
  
          # compute starts, ends and lengths of the segments
          starts = np.where(transitions == 1)[0]
          ends = np.where(transitions == -1)[0]
          lengths = ends - starts
  
          # filter out single points
          starts = starts[lengths >= self.min_length]
          lengths = lengths[lengths >= self.min_length]
  
          self._starts.append(starts)
          self._lengths.append(lengths)
  
      # put into dataframe
      Xt = pd.DataFrame()
      column_prefix = "{}_{}".format(
          column_name,
          "nan" if np.isnan(self.value) else str(self.value),
      )
      Xt["%s_starts" % column_prefix] = pd.Series(self._starts)
      Xt["%s_lengths" % column_prefix] = pd.Series(self._lengths)
  
      Xt = df_map(Xt)(lambda x: pd.Series(x))
      return Xt
  
imports: import numpy
  import pandas
  from joblib import Parallel, delayed
  from sktime.datatypes import convert_to
  from sktime.transformations.base import BaseTransformer
  from sktime.transformations.panel.segment import RandomIntervalSegmenter
  from sktime.utils.pandas import df_map
label_desc: Use image node_id 2 for calling the PlateauFinder obj's underlying member method code with example usage: obj._transform(X, y) and returns: Xt