class_docstr: Test behaviour of the learn_dynamic_structure of `from_pandas_dynamic`
class_docstr_tok: ["Test","behaviour","of","the","learn_dynamic_structure","of","`","from_pandas_dynamic","`"]
docstr: the result when given a list of dataframes should be the same as a single dataframe.
  Also, stacking two dataframes should give the same result as well
docstr_tok: ["the","result","when","given","a","list","of","dataframes","should","be","the","same","as","a","single","dataframe",".","Also",",","stacking","two","dataframes","should","give","the","same","result","as","well"]
code: def test_list_of_dfs_as_input(self, data_dynotears_p2):
      """
      the result when given a list of dataframes should be the same as a single dataframe.
      Also, stacking two dataframes should give the same result as well
      """
      df = pd.DataFrame(
          data_dynotears_p2["X"], columns=["a", "b", "c", "d", "e"]
      )
      df.loc[-1, :] = data_dynotears_p2["Y"][0, :5]
      df.loc[-2, :] = data_dynotears_p2["Y"][0, 5:10]
  
      df = df.sort_index()
      df_ = df.copy()
      df_.index = range(100, 152)
      df = pd.concat([df, df_])
      sm = from_pandas_dynamic(df, p=2, w_threshold=0.05)
      sm_1 = from_pandas_dynamic([df], p=2, w_threshold=0.05)
      sm_2 = from_pandas_dynamic([df, df], p=2, w_threshold=0.05)
  
      assert list(sm_2.edges) == list(sm_1.edges)
      assert list(sm.edges) == list(sm_1.edges)
  
      weights = np.array([w for _, _, w in sm.edges(data="weight")])
      weights_1 = np.array([w for _, _, w in sm_1.edges(data="weight")])
      weights_2 = np.array([w for _, _, w in sm_2.edges(data="weight")])
      assert np.max(np.abs(weights - weights_1)) < 0.001
      assert np.max(np.abs(weights - weights_2)) < 0.001
  
imports: import re
  import networkx
  import numpy
  import pandas
  import pytest
  from causalnex.structure.dynotears import from_numpy_dynamic, from_pandas_dynamic
label_desc: Use image node_id 18 for calling the TestFromPandasDynotears obj's underlying member method code with example usage: obj.test_list_of_dfs_as_input(data_dynotears_p2) without return types