class_docstr: Aggregates Panel data containing overlapping windows of one time series.
  
  The input data contains multiple overlapping time series elements that could
  arranged as follows:
  xxxx.....
  .xxxx....
  ..xxxx...
  ...xxxx..
  ....xxxx.
  .....xxxx
  ......xxxx
  .......xxxx
  ........xxxx
  .........xxxx
  The merger aggregates the data by aligning the time series windows as shown above
  and applying a aggregation function to the overlapping data points.
  The aggregation function can be one of "mean" or "median". I.e., the `mean` or
  `median` of each column is calculated, resulting in a univariate time series.
  
  Parameters
  ----------
  method : {`median`, `mean`}, default="median"
      The method to use for aggregation. Can be one of "mean" or "median".
  stride : int, default=0
      The stride to use for the aggregation. The stride determines the number of
      shifts between consecutive instances. A stride of 0 means no shift. A
      stride of 1 means that the time series is aggregated as above.
  
  Examples
  --------
  >>> from sktime.transformations.merger import Merger
  >>> from sktime.utils._testing.panel import _make_panel
  >>> y = _make_panel(n_instances=10, n_columns=3, n_timepoints=5)
  >>> result = Merger(method="median").fit_transform(y)
  >>> result.shape
  (3, 5)
  
  >>> from sktime.transformations.merger import Merger
  >>> from sktime.utils._testing.panel import _make_panel
  >>> y = _make_panel(n_instances=10, n_columns=3, n_timepoints=5)
  >>> result = Merger(method="median", stride=1).fit_transform(y)
  >>> result.shape
  (14, 3)
docstr: Merge the Panel data by aligning them temporally.
  
  Parameters
  ----------
  X : pd.DataFrame
      The input panel data.
  y : pd.Series
      ignored
  
  Returns
  -------
  returns a single time series
docstr_tok: ["Merge","the","Panel","data","by","aligning","them","temporally",".","Parameters","--","--","--","--","--","X",":","pd.DataFrame","The","input","panel","data",".","y",":","pd.Series","ignored","Returns","--","--","--","-","returns","a","single","time","series"]
code: def _transform(self, X=None, y=None):
      """Merge the Panel data by aligning them temporally.
  
      Parameters
      ----------
      X : pd.DataFrame
          The input panel data.
      y : pd.Series
          ignored
  
      Returns
      -------
      returns a single time series
      """
      horizon = X.shape[-1]
  
      if self.method == "mean":
          result = np.nanmean(self._align_temporal(horizon, X), axis=0)
      elif self.method == "median":
          result = np.nanmedian(
              self._align_temporal(horizon, X), axis=0
          )
      else:
          raise ValueError(f"{self.method} must be 'mean' or 'median'.")
      return result
  
imports: import numpy
  from sktime.transformations.base import BaseTransformer
label_desc: Use image node_id 2 for calling the Merger obj's underlying member method code with example usage: obj._transform(X, y) and returns: result