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)
docstr: Check if the input of function `from_pandas_dynamic` is valid
  Args:
      time_series: List of pd.DataFrame instances.
          each element of the list being an realisation of a same time series
  
  Raises:
      ValueError: if empty list of time_series is provided
      ValueError: if dataframes contain non numeric data
      TypeError: if elements provided are not pandas dataframes
      ValueError: if dataframes contain different columns
      ValueError: if dataframes index is not in increasing order
      TypeError: if dataframes index are not index
docstr_tok: ["Check","if","the","input","of","function","`","from_pandas_dynamic","`","is","valid","Args",":","time_series",":","List","of","pd.DataFrame","instances",".","each","element","of","the","list","being","an","realisation","of","a","same","time","series","Raises",":","ValueError",":","if","empty","list","of","time_series","is","provided","ValueError",":","if","dataframes","contain","non","numeric","data","TypeError",":","if","elements","provided","are","not","pandas","dataframes","ValueError",":","if","dataframes","contain","different","columns","ValueError",":","if","dataframes","index","is","not","in","increasing","order","TypeError",":","if","dataframes","index","are","not","index"]
code: def _check_input_from_pandas(self, time_series: List[pd.DataFrame]):
      """
      Check if the input of function `from_pandas_dynamic` is valid
      Args:
          time_series: List of pd.DataFrame instances.
              each element of the list being an realisation of a same time series
  
      Raises:
          ValueError: if empty list of time_series is provided
          ValueError: if dataframes contain non numeric data
          TypeError: if elements provided are not pandas dataframes
          ValueError: if dataframes contain different columns
          ValueError: if dataframes index is not in increasing order
          TypeError: if dataframes index are not index
      """
      if not time_series:
          raise ValueError(
              "Provided empty list of time_series. At least one DataFrame must be provided"
          )
  
      df = deepcopy(time_series[0])
  
      for t in time_series:
          if not isinstance(t, pd.DataFrame):
              raise TypeError(
                  "Time series entries must be instances of `pd.DataFrame`"
              )
  
          non_numeric_cols = t.select_dtypes(exclude="number").columns
  
          if not non_numeric_cols.empty:
              raise ValueError(
                  "All columns must have numeric data. Consider mapping the "
                  f"following columns to int: {list(non_numeric_cols)}"
              )
  
          if (not np.all(df.columns == t.columns)) or (
              not np.all(df.dtypes == t.dtypes)
          ):
              raise ValueError(
                  "All inputs must have the same columns and same types"
              )
  
          if not np.all(t.index == t.index.sort_values()):
              raise ValueError(
                  "Index for dataframe must be provided in increasing order"
              )
  
          if not t.index.is_integer():
              raise TypeError("Index must be integers")
  
          if self.columns is not None:
              missing_cols = [
                  c for c in self.columns if c not in t.columns
              ]
              if missing_cols:
                  raise ValueError(
                      "We should provide all necessary columns in the time series. "
                      f"Columns not provided: {missing_cols}"
                  )
  
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 5 for calling the DynamicDataTransformer obj's underlying member method code with example usage: obj._check_input_from_pandas(time_series) without return types