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: Isolated nodes should still be in the learned structure
docstr_tok: ["Isolated","nodes","should","still","be","in","the","learned","structure"]
code: def test_isolated_nodes_exist(self, data_dynotears_p2):
      """Isolated nodes should still be in the learned structure"""
      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()
  
      sm = from_pandas_dynamic(df, p=2, w_threshold=1)
      assert len(sm.edges) == 2
      assert len(sm.nodes) == 15
  
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 12 for calling the TestFromPandasDynotears obj's underlying member method code with example usage: obj.test_isolated_nodes_exist(data_dynotears_p2) without return types