suspicions.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:jarbas 作者: datasciencebr 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号