code: def test_to_dataframe_is_as_expected(self):
      features = ["Flu", "Meningitis", "Light Sensitivity", "Fever"]
      feat_values = [
          [False, True],
          [False, True],
          [False, True],
          [False, True],
      ]
      index = pd.MultiIndex.from_product(feat_values, names=features)
  
      a = np.zeros([2, 2, 2, 2])
      a[0, 1, 1, 1] = 1.0
  
      pmf = PMF(
          {
              "Flu": [False, True],
              "Meningitis": [False, True],
              "Light Sensitivity": [False, True],
              "Fever": [False, True],
          },
          a,
      )
  
      df = pmf.to_dataframe()
  
      expected_df = pd.DataFrame(a.flatten(), index=index)
      pd.testing.assert_frame_equal(expected_df, df)
  
file_path: typedb-ml/examples/diagnosis/dataset/pmf_test.py
imports: import unittest
  import numpy
  import pandas
  from pmf import PMF
label_desc: Use image node_id 3 for calling the TestPMF obj's underlying member method code with example usage: obj.test_to_dataframe_is_as_expected() without return types