def _get_head_of_matrix(self):
try:
hdf = pandas.HDFStore(self.matrix_path)
key = hdf.keys()[0]
head_of_matrix = hdf.select(key, start=0, stop=1)
head_of_matrix.set_index(self.metadata['indices'], inplace=True)
self._head_of_matrix = head_of_matrix
except pandas.error.EmptyDataError:
self._head_of_matrix = None
评论列表
文章目录