class_docstr: Discrete Wavelet Transform Transformer.
  
  Performs the Haar wavelet transformation on a time series.
  
  Parameters
  ----------
  num_levels : int, number of levels to perform the Haar wavelet
               transformation.
class_docstr_tok: ["Discrete","Wavelet","Transform","Transformer",".","Performs","the","Haar","wavelet","transformation","on","a","time","series",".","Parameters","--","--","--","--","--","num_levels",":","int",",","number","of","levels","to","perform","the","Haar","wavelet","transformation","."]
docstr: Transform X and return a transformed version.
  
  private _transform containing core logic, called from transform
  
  Parameters
  ----------
  X : nested pandas DataFrame of shape [n_instances, n_features]
      each cell of X must contain pandas.Series
      Data to fit transform to
  y : ignored argument for interface compatibility
      Additional data, e.g., labels for transformation
  
  Returns
  -------
  Xt : nested pandas DataFrame of shape [n_instances, n_features]
      each cell of Xt contains pandas.Series
      transformed version of X
docstr_tok: ["Transform","X","and","return","a","transformed","version",".","private","_transform","containing","core","logic",",","called","from","transform","Parameters","--","--","--","--","--","X",":","nested","pandas","DataFrame","of","shape","[","n_instances",",","n_features","]","each","cell","of","X","must","contain","pandas.Series","Data","to","fit","transform","to","y",":","ignored","argument","for","interface","compatibility","Additional","data",",","e.g.",",","labels","for","transformation","Returns","--","--","--","-","Xt",":","nested","pandas","DataFrame","of","shape","[","n_instances",",","n_features","]","each","cell","of","Xt","contains","pandas.Series","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 : nested pandas DataFrame of shape [n_instances, n_features]
          each cell of X must contain pandas.Series
          Data to fit transform to
      y : ignored argument for interface compatibility
          Additional data, e.g., labels for transformation
  
      Returns
      -------
      Xt : nested pandas DataFrame of shape [n_instances, n_features]
          each cell of Xt contains pandas.Series
          transformed version of X
      """
      self._check_parameters()
  
      # Get information about the dataframe
      col_names = X.columns
  
      Xt = pd.DataFrame()
      for x in col_names:
          # Convert one of the columns in the dataframe to numpy array
          arr = convert(
              pd.DataFrame(X[x]),
              from_type="nested_univ",
              to_type="numpyflat",
              as_scitype="Panel",
          )
  
          transformedData = self._extract_wavelet_coefficients(arr)
  
          # Convert to a numpy array
          transformedData = np.asarray(transformedData)
  
          # Add it to the dataframe
          colToAdd = []
          for i in range(len(transformedData)):
              inst = transformedData[i]
              colToAdd.append(pd.Series(inst))
  
          Xt[x] = colToAdd
  
      return Xt
  
file_path: sktime/sktime/transformations/panel/dwt.py
imports: import math
  import numpy
  import pandas
  from sktime.datatypes import convert
  from sktime.transformations.base import BaseTransformer
label_desc: Use image node_id 2 for calling the DWTTransformer obj's underlying member method code with example usage: obj._transform(X, y) and returns: Xt