parameters: (path_or_buf, encoding='utf-8', iterator=False, **kwargs)
docstring: Load msgpack pandas object from the specified
      file path
  
      THIS IS AN EXPERIMENTAL LIBRARY and the storage format
      may not be stable until a future release.
  
      Parameters
      ----------
      path_or_buf : string File path, BytesIO like or string
      encoding : Encoding for decoding msgpack str type
      iterator : boolean, if True, return an iterator to the unpacker
                 (default is False)
  
      Returns
      -------
      obj : same type as object stored in file
docstring_summary: Load msgpack pandas object from the specified
      file path
docstring_tokens: Load msgpack pandas object from the specified file path
function: def read_msgpack(path_or_buf, encoding='utf-8', iterator=False, **kwargs):
      """
      Load msgpack pandas object from the specified
      file path
  
      THIS IS AN EXPERIMENTAL LIBRARY and the storage format
      may not be stable until a future release.
  
      Parameters
      ----------
      path_or_buf : string File path, BytesIO like or string
      encoding : Encoding for decoding msgpack str type
      iterator : boolean, if True, return an iterator to the unpacker
                 (default is False)
  
      Returns
      -------
      obj : same type as object stored in file
      """
      path_or_buf, _, _, should_close = get_filepath_or_buffer(path_or_buf)
      if iterator:
          return Iterator(path_or_buf)
  
      def read(fh):
          unpacked_obj = list(unpack(fh, encoding=encoding, **kwargs))
          if len(unpacked_obj) == 1:
              return unpacked_obj[0]
  
          if should_close:
              try:
                  path_or_buf.close()
              except IOError:
                  pass
          return unpacked_obj
  
      # see if we have an actual file
      if isinstance(path_or_buf, compat.string_types):
          try:
              exists = os.path.exists(path_or_buf)
          except (TypeError, ValueError):
              exists = False
  
          if exists:
              with open(path_or_buf, 'rb') as fh:
                  return read(fh)
  
      if isinstance(path_or_buf, compat.binary_type):
          # treat as a binary-like
          fh = None
          try:
              # We can't distinguish between a path and a buffer of bytes in
              # Python 2 so instead assume the first byte of a valid path is
              # less than 0x80.
              if compat.PY3 or ord(path_or_buf[0]) >= 0x80:
                  fh = compat.BytesIO(path_or_buf)
                  return read(fh)
          finally:
              if fh is not None:
                  fh.close()
      elif hasattr(path_or_buf, 'read') and compat.callable(path_or_buf.read):
          # treat as a buffer like
          return read(path_or_buf)
  
      raise ValueError('path_or_buf needs to be a string file path or file-like')
function_tokens: def read_msgpack ( path_or_buf , encoding = 'utf-8' , iterator = False , * * kwargs ) : path_or_buf , _ , _ , should_close = get_filepath_or_buffer ( path_or_buf ) if iterator : return Iterator ( path_or_buf ) def read ( fh ) : unpacked_obj = list ( unpack ( fh , encoding = encoding , * * kwargs ) ) if len ( unpacked_obj ) == 1 : return unpacked_obj [ 0 ] if should_close : try : path_or_buf . close ( ) except IOError : pass return unpacked_obj # see if we have an actual file if isinstance ( path_or_buf , compat . string_types ) : try : exists = os . path . exists ( path_or_buf ) except ( TypeError , ValueError ) : exists = False if exists : with open ( path_or_buf , 'rb' ) as fh : return read ( fh ) if isinstance ( path_or_buf , compat . binary_type ) : # treat as a binary-like fh = None try : # We can't distinguish between a path and a buffer of bytes in # Python 2 so instead assume the first byte of a valid path is # less than 0x80. if compat . PY3 or ord ( path_or_buf [ 0 ] ) >= 0x80 : fh = compat . BytesIO ( path_or_buf ) return read ( fh ) finally : if fh is not None : fh . close ( ) elif hasattr ( path_or_buf , 'read' ) and compat . callable ( path_or_buf . read ) : # treat as a buffer like return read ( path_or_buf ) raise ValueError ( 'path_or_buf needs to be a string file path or file-like' )