code: def to_df(self):
      """Conversion method to Pandas DataFrame. To be attached to ResultDict.
  
      Returns
      -------
      main_effect, inter_effect: tuple
          A tuple of DataFrames for main effects and interaction effects.
          The second element (for interactions) will be `None` if not available.
      """
      names = self["names"]
      main_effect = self["ME"]
      interactions = self.get("IE", None)
  
      inter_effect = None
      if interactions:
          interaction_names = self.get("interaction_names")
          names = [name for name in names if not isinstance(name, list)]
          inter_effect = pd.DataFrame(
              {"IE": interactions}, index=interaction_names
          )
  
      main_effect = pd.DataFrame({"ME": main_effect}, index=names)
  
      return main_effect, inter_effect
  
file_path: SALib/src/SALib/analyze/ff.py
imports: import numpy
  from .None import common_args
  import pandas
  from types import MethodType
  from SALib.util import read_param_file, ResultDict
  from SALib.sample.ff import generate_contrast, extend_bounds
label_desc: Use image node_id 2 for calling a global function with example usage: to_df() and returns: main_effect,  inter_effect