dof_parser.py 文件源码

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

项目:nyc-db 作者: aepyornis 项目源码 文件源码
def parse_dof_file(file_path):
    """ Parse dof rolling sales xls file"""
    book = xlrd.open_workbook(file_path)
    sheet = book.sheet_by_index(0)
    rows = sheet.get_rows()

    # remove first 4 row
    [next(rows) for x in range(4)]
    # 5th row is the headers
    headers = to_headers(next(rows))

    for row in rows:
        _row = list(map(cell_converter, row))

        if len(list(filter(item_exists, _row))):
            yield dict(zip(headers, _row))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号