class_docstr: Data model used for storing a batch of frames.
  Internally stored as a pandas DataFrame with columns
  "id" and "data".
  id: integer index of frame
  data: frame as np.array
  
  Arguments:
      frames (DataFrame): pandas Dataframe holding frames data
class_docstr_tok: ["Data","model","used","for","storing","a","batch","of","frames",".","Internally","stored","as","a","pandas","DataFrame","with","columns","''","id","''","and","``","data","''",".","id",":","integer","index","of","frame","data",":","frame","as","np.array","Arguments",":","frames","(","DataFrame",")",":","pandas","Dataframe","holding","frames","data"]
docstr: Stack a given batch along the 0th dimension.
  Notice: input assumed to contain only one column with video frames
  
  Returns:
      Batch (always of length 1)
docstr_tok: ["Stack","a","given","batch","along","the","0th","dimension",".","Notice",":","input","assumed","to","contain","only","one","column","with","video","frames","Returns",":","Batch","(","always","of","length","1",")"]
code: def stack(cls, batch: Batch, copy=True) -> Batch:
      """Stack a given batch along the 0th dimension.
      Notice: input assumed to contain only one column with video frames
  
      Returns:
          Batch (always of length 1)
      """
      if len(batch.columns) > 1:
          raise ValueError(
              "Stack can only be called on single-column batches"
          )
      frame_data_col = batch.columns[0]
      data_to_stack = batch.frames[frame_data_col].values.tolist()
  
      if (
          isinstance(data_to_stack[0], np.ndarray)
          and len(data_to_stack[0].shape) > 1
      ):
          # if data_to_stack has more than 1 axis, we add a new axis
          # [(3, 224, 224) * 10] -> (10, 3, 224, 224)
          stacked_array = np.array(
              batch.frames[frame_data_col].values.tolist()
          )
      else:
          # we concatenate along the zeroth axis
          # this makes sense for audio and text
          stacked_array = np.hstack(batch.frames[frame_data_col].values)
  
      stacked_frame = pd.DataFrame([{frame_data_col: stacked_array}])
      return Batch(stacked_frame)
  
imports: from typing import Callable, Iterable, List, TypeVar, Union
  import numpy
  import pandas
  from evadb.expression.abstract_expression import ExpressionType
  from evadb.parser.alias import Alias
  from evadb.utils.generic_utils import PickleSerializer
  from evadb.utils.logging_manager import logger
label_desc: Use image node_id 36 for calling the Batch obj's underlying member method code with example usage: obj.stack(cls, batch, copy) and returns: Batch