def suspicions(self):
"""Returns a Generator with batches of suspicions."""
print('Loading suspicions dataset…', end='\r')
with lzma.open(self.path, mode='rt', encoding='utf-8') as file_handler:
batch = []
for row in csv.DictReader(file_handler):
batch.append(self.serialize(row))
if len(batch) >= self.batch_size:
yield batch
batch = []
yield batch
评论列表
文章目录