code: def _dataframes_contain_same_data(
      actual: pd.DataFrame,
      expected: pd.DataFrame,
  ) -> bool:
      """Compare all elements of the dataframe one by one for equality.
  
      We use math.isclose() to avoid issues with float comparisons.
      """
      if expected.shape != actual.shape:
          return False
  
      for c in range(expected.shape[0]):
          for r in range(expected.shape[1]):
              # NaNs can't be compared for equality.
              if pd.isna(expected.iloc[c, r]) and pd.isna(
                  actual.iloc[c, r]
              ):
                  pass
              elif isinstance(
                  expected.iloc[c, r], SupportsFloat
              ) and isinstance(actual.iloc[c, r], SupportsFloat):
                  if not math.isclose(
                      expected.iloc[c, r],
                      actual.iloc[c, r],
                      rel_tol=1e-6,
                  ):
                      return False
              elif (
                  isinstance(expected.iloc[c, r], pd.Timestamp)
                  and isinstance(actual.iloc[c, r], pd.Timestamp)
                  # If expected has no tz but actual is UTC, remove timezone. Some engines add UTC by default.
                  and actual.iloc[c, r].tzname() == "UTC"
                  and expected.iloc[c, r].tzname() is None
              ):
                  if actual.iloc[c, r].tz_localize(
                      None
                  ) != expected.iloc[c, r].tz_localize(None):
                      return False
              elif expected.iloc[c, r] != actual.iloc[c, r]:
                  return False
      return True
  
imports: from __future__ import annotations
  import logging
  import math
  from typing import SupportsFloat
  import pandas
label_desc: Use image node_id 1 for calling a global function with example usage: _dataframes_contain_same_data(actual, expected) and returns: True, False, False, False, False