class_docstr: Matchzoo :class:`DataPack` data structure, store dataframe and context.
  
  `DataPack` is a MatchZoo native data structure that most MatchZoo data
  handling processes build upon. A `DataPack` consists of three parts:
  `left`, `right` and `relation`, each one of is a `pandas.DataFrame`.
  
  :param relation: Store the relation between left document
      and right document use ids.
  :param left: Store the content or features for id_left.
  :param right: Store the content or features for
      id_right.
  
  Example:
      >>> left = [
      ...     ['qid1', 'query 1'],
      ...     ['qid2', 'query 2']
      ... ]
      >>> right = [
      ...     ['did1', 'document 1'],
      ...     ['did2', 'document 2']
      ... ]
      >>> relation = [['qid1', 'did1', 1], ['qid2', 'did2', 1]]
      >>> relation_df = pd.DataFrame(relation)
      >>> left = pd.DataFrame(left)
      >>> right = pd.DataFrame(right)
      >>> dp = DataPack(
      ...     relation=relation_df,
      ...     left=left,
      ...     right=right,
      ... )
      >>> len(dp)
      2
class_docstr_tok: ["Matchzoo",":","class",":","`","DataPack","`","data","structure",",","store","dataframe","and","context",".","`","DataPack","`","is","a","MatchZoo","native","data","structure","that","most","MatchZoo","data","handling","processes","build","upon",".","A","`","DataPack","`","consists","of","three","parts",":","`","left","`",",","`","right","`","and","`","relation","`",",","each","one","of","is","a","`","pandas.DataFrame","`",".",":","param","relation",":","Store","the","relation","between","left","document","and","right","document","use","ids",".",":","param","left",":","Store","the","content","or","features","for","id_left",".",":","param","right",":","Store","the","content","or","features","for","id_right",".","Example",":",">",">",">","left","=","[","...","[","'qid1","'",",","'query","1","'","]",",","...","[","'qid2","'",",","'query","2","'","]","...","]",">",">",">","right","=","[","...","[","'did1","'",",","'document","1","'","]",",","...","[","'did2","'",",","'document","2","'","]","...","]",">",">",">","relation","=","[","[","'qid1","'",",","'did1","'",",","1","]",",","[","'qid2","'",",","'did2","'",",","1","]","]",">",">",">","relation_df","=","pd.DataFrame","(","relation",")",">",">",">","left","=","pd.DataFrame","(","left",")",">",">",">","right","=","pd.DataFrame","(","right",")",">",">",">","dp","=","DataPack","(","...","relation=relation_df",",","...","left=left",",","...","right=right",",","...",")",">",">",">","len","(","dp",")","2"]
docstr: View the data pack as a :class:`pandas.DataFrame`.
  
  Returned data frame is created by merging the left data frame,
  the right dataframe and the relation data frame. Use `[]` to access
  an item or a slice of items.
  
  :return: A :class:`matchzoo.DataPack.FrameView` instance.
  
  Example:
      >>> import matchzoo as mz
      >>> data_pack = mz.datasets.toy.load_data()
      >>> type(data_pack.frame)
      <class 'matchzoo.data_pack.data_pack.DataPack.FrameView'>
      >>> frame_slice = data_pack.frame[0:5]
      >>> type(frame_slice)
      <class 'pandas.core.frame.DataFrame'>
      >>> list(frame_slice.columns)
      ['id_left', 'text_left', 'id_right', 'text_right', 'label']
      >>> full_frame = data_pack.frame()
      >>> len(full_frame) == len(data_pack)
      True
docstr_tok: ["View","the","data","pack","as","a",":","class",":","`","pandas.DataFrame","`",".","Returned","data","frame","is","created","by","merging","the","left","data","frame",",","the","right","dataframe","and","the","relation","data","frame",".","Use","`","[","]","`","to","access","an","item","or","a","slice","of","items",".",":","return",":","A",":","class",":","`","matchzoo.DataPack.FrameView","`","instance",".","Example",":",">",">",">","import","matchzoo","as","mz",">",">",">","data_pack","=","mz.datasets.toy.load_data","(",")",">",">",">","type","(","data_pack.frame",")","<","class","'matchzoo.data_pack.data_pack.DataPack.FrameView","'",">",">",">",">","frame_slice","=","data_pack.frame","[","0:5","]",">",">",">","type","(","frame_slice",")","<","class","'pandas.core.frame.DataFrame","'",">",">",">",">","list","(","frame_slice.columns",")","[","'id_left","'",",","'text_left","'",",","'id_right","'",",","'text_right","'",",","'label","'","]",">",">",">","full_frame","=","data_pack.frame","(",")",">",">",">","len","(","full_frame",")","==","len","(","data_pack",")","True"]
code: def frame(self) -> "DataPack.FrameView":
      """
      View the data pack as a :class:`pandas.DataFrame`.
  
      Returned data frame is created by merging the left data frame,
      the right dataframe and the relation data frame. Use `[]` to access
      an item or a slice of items.
  
      :return: A :class:`matchzoo.DataPack.FrameView` instance.
  
      Example:
          >>> import matchzoo as mz
          >>> data_pack = mz.datasets.toy.load_data()
          >>> type(data_pack.frame)
          <class 'matchzoo.data_pack.data_pack.DataPack.FrameView'>
          >>> frame_slice = data_pack.frame[0:5]
          >>> type(frame_slice)
          <class 'pandas.core.frame.DataFrame'>
          >>> list(frame_slice.columns)
          ['id_left', 'text_left', 'id_right', 'text_right', 'label']
          >>> full_frame = data_pack.frame()
          >>> len(full_frame) == len(data_pack)
          True
  
      """
      return DataPack.FrameView(self)
  
imports: import typing
  import inspect
  from pathlib import Path
  import functools
  import dill
  from tqdm import tqdm
  import numpy
  import pandas
  import matchzoo
label_desc: Use image node_id 4 for calling the DataPack obj's underlying member method code with example usage: obj.frame() and returns: DataPack