class_docstr: Create exogeneous features which are a copy of the endogenous data.
  
  Replaces exogeneous features (`X`) by endogeneous data (`y`).
  
  To *add* instead of *replace*, use `FeatureUnion`.
  
  Parameters
  ----------
  subset_index : boolean, optional, default=False
      if True, subsets the output of `transform` to `X.index`,
      i.e., outputs `y.loc[X.index]`
class_docstr_tok: ["Create","exogeneous","features","which","are","a","copy","of","the","endogenous","data",".","Replaces","exogeneous","features","(","`","X","`",")","by","endogeneous","data","(","`","y","`",")",".","To","*","add","*","instead","of","*","replace","*",",","use","`","FeatureUnion","`",".","Parameters","--","--","--","--","--","subset_index",":","boolean",",","optional",",","default=False","if","True",",","subsets","the","output","of","`","transform","`","to","`","X.index","`",",","i.e.",",","outputs","`","y.loc","[","X.index","]","`"]
docstr: Transform X and return a transformed version.
  
  private _transform containing core logic, called from transform
  
  Parameters
  ----------
  X : time series or panel in one of the pd.DataFrame formats
      Data to be transformed
  y : time series or panel in one of the pd.DataFrame formats
      Additional data, e.g., labels for transformation
  
  Returns
  -------
  y, as a transformed version of X
docstr_tok: ["Transform","X","and","return","a","transformed","version",".","private","_transform","containing","core","logic",",","called","from","transform","Parameters","--","--","--","--","--","X",":","time","series","or","panel","in","one","of","the","pd.DataFrame","formats","Data","to","be","transformed","y",":","time","series","or","panel","in","one","of","the","pd.DataFrame","formats","Additional","data",",","e.g.",",","labels","for","transformation","Returns","--","--","--","-","y",",","as","a","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 : time series or panel in one of the pd.DataFrame formats
          Data to be transformed
      y : time series or panel in one of the pd.DataFrame formats
          Additional data, e.g., labels for transformation
  
      Returns
      -------
      y, as a transformed version of X
      """
      if self.subset_index:
          return y.loc[X.index.intersection(y.index)]
      else:
          return y
  
imports: from sktime.transformations.base import BaseTransformer
label_desc: Use image node_id 2 for calling the YtoX obj's underlying member method code with example usage: obj._transform(X, y) and returns: y, y