class_docstr: Test behaviour of the from_pandas method
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, train_data_idx):
      """Isolated nodes should still be in the learned structure"""
  
      g = from_pandas(train_data_idx, w_threshold=1.0)
      assert len(g.nodes) == len(train_data_idx.columns)
  
imports: import logging
  import networkx
  import numpy
  import pandas
  import pytest
  import scipy.optimize
  from mock import patch
  from causalnex.structure import StructureModel
  from causalnex.structure.data_generators import generate_binary_data, generate_binary_dataframe, generate_continuous_dataframe, generate_count_dataframe, generate_structure
  from causalnex.structure.pytorch.notears import from_numpy, from_pandas
label_desc: Use image node_id 2 for calling the TestFromPandas obj's underlying member method code with example usage: obj.test_isolated_nodes_exist(train_data_idx) without return types