utils_pdq.py 文件源码

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

项目:oim-cms 作者: parksandwildlife 项目源码 文件源码
def csv_data(csv_path, skip_header=True):
    """Pass in the path to a CSV file, returns a CSV Reader object.
    """
    csv_file = open(csv_path, 'r')
    # Determine the CSV dialect.
    dialect = unicodecsv.Sniffer().sniff(csv_file.read(1024))
    csv_file.seek(0)
    data = unicodecsv.reader(csv_file, dialect)
    if skip_header:
        data.next()
    return data
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号