class_docstr: Table datatype follows the rules of pandas dataframes.
  
  Pandas dataframe's ``to_dict`` and ``from_dict`` API interface has been used here.
  We rely on pandas exclusively for formatting and conversion to and from dict.
  Also, we offload most of the validations/verifications to pandas. We still do
  few checks explicitly, but with the help of pandas data structure.
  Some of them are:
  
  *  Length or number of elements in each row (if ``column_names`` provided)
  *  Order of elements (if ``column_names`` are provided)
  *  Invalid data type: Supported dtypes are ``float64``, ``float32``, ``float16``,
     ``complex64``, ``complex128``, ``int64``, ``int32``, ``int16``, ``int8``,
     ``uint8``, and ``bool``
  
  The layout (orientation) of the incoming/outgoing dictionary is not customizable
  although pandas API allows this. This decision is made to make sure we wouldn't
  have issues handling different layouts in a composition setup downstream.
  
  Parameters
  ----------
  column_names
      a list of column names to set up in the table.
  
  Notes
  -----
  *  It might be better to remove pandas dependency to gain performance however we
     are offloading the validation logic to pandas which would have been painful if
     we were to do custom built logic
code: def serialize(self, tensor: Tensor) -> Dict:
      tensor = tensor.numpy()
      df = pd.DataFrame(tensor, columns=self.column_names)
      return df.to_dict()
  
file_path: lightning-flash/src/flash/core/serve/types/table.py
imports: from dataclasses import dataclass
  from typing import Any, Dict, List, Union
  import numpy
  import pandas
  import torch
  from torch import Tensor
  from flash.core.serve.types.base import BaseType
label_desc: Use image node_id 1 for calling the Table obj's underlying member method code with example usage: obj.serialize(tensor) and returns: df