def load(self, f):
        """
        Load data from a file.

        :param f: file-like object or path to file
        :type f: file or str
        """
        with _open_file_obj(f) as f:
            parser = self.parse_file(f)
            self.deserialize(parser)