code: def dataframe_equals(df1: pd.DataFrame, df2: pd.DataFrame) -> bool:
      """Compare equality of two pandas dataframes."""
      try:
          if df1.empty and df2.empty:
              equal = True
          else:
              pd.testing.assert_frame_equal(
                  df1.sort_index(axis=1),
                  df2.sort_index(axis=1),
                  check_exact=False,
              )
              equal = True
      except AssertionError:
          equal = False
  
      return equal
  
file_path: Ax/ax/utils/common/equality.py
imports: from __future__ import annotations
  from datetime import datetime
  from typing import Any, Callable, Dict, List, Optional, Tuple
  import numpy
  import pandas
  from ax.utils.common.typeutils import numpy_type_to_python_type
label_desc: Use image node_id 4 for calling a global function with example usage: dataframe_equals(df1, df2) and returns: equal