class_docstr: Format a time series dataframe or list of dataframes into the a format that matches the structure learned by
      `from_pandas_dynamic`. This is done to allow for bayesian network probability fitting.
  
      Example of utilisation:
      >>> ddt = DynamicDataTransformer(p=p).fit(time_series, return_df=False)
      >>> X, Xlags = ddt.transform(time_series)
  
      >>> ddt = DynamicDataTransformer(p=p).fit(time_series, return_df=True)
      >>> df = ddt.transform(time_series)
code: def _concat_lags(
      self, X: np.ndarray, Xlags: np.ndarray
  ) -> pd.DataFrame:
      df_x = pd.DataFrame(
          X, columns=[f"{col}_lag0" for col in self.columns]
      )
      df_xlags = pd.DataFrame(
          Xlags,
          columns=[
              f"{col}_lag{l_}"
              for l_ in range(1, self.p + 1)
              for col in self.columns
          ],
      )
      return pd.concat([df_x, df_xlags], axis=1)
  
file_path: causalnex/causalnex/structure/transformers.py
imports: from copy import deepcopy
  from typing import List, Tuple, Union
  import numpy
  import pandas
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.exceptions import NotFittedError
label_desc: Use image node_id 4 for calling the DynamicDataTransformer obj's underlying member method code with example usage: obj._concat_lags(X, Xlags) and returns: pd