class_docstr: Turns time series/panel data into tabular data based on intervals.
  
  This estimator converts nested pandas dataframe containing
  time-series/panel data with numpy arrays or pandas Series in
  dataframe cells into a tabular pandas dataframe with only primitives in
  cells. The primitives are calculated based on Intervals defined
  by the IntervalIndex and aggregated by aggfunc.
  
  This is useful for transforming time-series/panel data
  into a format that is accepted by standard validation learning
  algorithms (as in sklearn).
  
  Parameters
  ----------
  idx : pd.IntervalIndex
      IntervalIndex defining intervals considered by aggfunc
  aggfunc : callable
      Function used to aggregate the values in intervals.
      Should have signature 1D -> float and defaults
      to mean if None
class_docstr_tok: ["Turns","time","series\/panel","data","into","tabular","data","based","on","intervals",".","This","estimator","converts","nested","pandas","dataframe","containing","time-series\/panel","data","with","numpy","arrays","or","pandas","Series","in","dataframe","cells","into","a","tabular","pandas","dataframe","with","only","primitives","in","cells",".","The","primitives","are","calculated","based","on","Intervals","defined","by","the","IntervalIndex","and","aggregated","by","aggfunc",".","This","is","useful","for","transforming","time-series\/panel","data","into","a","format","that","is","accepted","by","standard","validation","learning","algorithms","(","as","in","sklearn",")",".","Parameters","--","--","--","--","--","idx",":","pd.IntervalIndex","IntervalIndex","defining","intervals","considered","by","aggfunc","aggfunc",":","callable","Function","used","to","aggregate","the","values","in","intervals",".","Should","have","signature","1D","-",">","float","and","defaults","to","mean","if","None"]
docstr: Transform X and return a transformed version.
  
  private _transform containing core logic, called from transform
  
  Parameters
  ----------
  X : Series or Panel of mtype X_inner_mtype
      if X_inner_mtype is list, _transform must support all types in it
      Data to be transformed
  y : Series or Panel of mtype y_inner_mtype, default=None
      Additional data, e.g., labels for transformation
  
  Returns
  -------
  transformed version of X
docstr_tok: ["Transform","X","and","return","a","transformed","version",".","private","_transform","containing","core","logic",",","called","from","transform","Parameters","--","--","--","--","--","X",":","Series","or","Panel","of","mtype","X_inner_mtype","if","X_inner_mtype","is","list",",","_transform","must","support","all","types","in","it","Data","to","be","transformed","y",":","Series","or","Panel","of","mtype","y_inner_mtype",",","default=None","Additional","data",",","e.g.",",","labels","for","transformation","Returns","--","--","--","-","transformed","version","of","X"]
code: def _transform(self, X, y=None):
      """Transform X and return a transformed version.
  
      private _transform containing core logic, called from transform
  
      Parameters
      ----------
      X : Series or Panel of mtype X_inner_mtype
          if X_inner_mtype is list, _transform must support all types in it
          Data to be transformed
      y : Series or Panel of mtype y_inner_mtype, default=None
          Additional data, e.g., labels for transformation
  
      Returns
      -------
      transformed version of X
      """
      idx = pd.cut(
          X.iloc[0, 0].index, bins=self.idx, include_lowest=True
      )
      Xt = df_map(X)(lambda x: x.groupby(idx).apply(self._aggfunc))
      Xt = convert_to(Xt, to_type="numpyflat", as_scitype="Panel")
      return Xt
  
file_path: sktime/sktime/transformations/panel/reduce.py
imports: import warnings
  import numpy
  import pandas
  from sktime.datatypes import convert, convert_to
  from sktime.transformations.base import BaseTransformer
  from sktime.utils.pandas import df_map
label_desc: Use image node_id 2 for calling the TimeBinner obj's underlying member method code with example usage: obj._transform(X, y) and returns: Xt