class_docstr: Accepts or displays 2D input through a spreadsheet-like component for dataframes.
  Preprocessing: passes the uploaded spreadsheet data as a {pandas.DataFrame}, {numpy.array}, or {List[List]} depending on `type`
  Postprocessing: expects a {pandas.DataFrame}, {pandas.Styler}, {numpy.array}, {List[List]}, {List}, a {Dict} with keys `data` (and optionally `headers`), or {str} path to a csv, which is rendered in the spreadsheet.
  Examples-format: a {str} filepath to a csv with data, a pandas dataframe, or a list of lists (excluding headers) where each sublist is a row of data.
  Demos: filter_records, matrix_transpose, tax_calculator
code: def __extract_metadata(df: Styler) -> dict[str, list[list]]:
      metadata = {"display_value": [], "styling": []}
      style_data = df._compute()._translate(None, None)  # type: ignore
      cell_styles = style_data.get("cellstyle", [])
      for i in range(len(style_data["body"])):
          metadata["display_value"].append([])
          metadata["styling"].append([])
          for j in range(len(style_data["body"][i])):
              cell_type = style_data["body"][i][j]["type"]
              if cell_type != "td":
                  continue
              display_value = style_data["body"][i][j]["display_value"]
              cell_id = style_data["body"][i][j]["id"]
              styles_str = Dataframe.__get_cell_style(
                  cell_id, cell_styles
              )
              metadata["display_value"][i].append(display_value)
              metadata["styling"][i].append(styles_str)
      return metadata
  
imports: from __future__ import annotations
  import warnings
  from typing import Any, Callable, Dict, List, Literal, Optional
  import numpy
  import pandas
  import semantic_version
  from gradio_client.documentation import document, set_documentation_group
  from pandas.io.formats.style import Styler
  from gradio.components import Component
  from gradio.data_classes import GradioModel
  from gradio.events import Events
label_desc: Use image node_id 5 for calling the Dataframe obj's underlying member method code with example usage: obj.__extract_metadata(df) and returns: metadata