run.py 文件源码

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

项目:twitter_mongodb_helper 作者: IDEA-NTHU-Taiwan 项目源码 文件源码
def write_csv_file(filename, result, path):
    """Writes the result to csv with the given filename.
    Args:
        filename   (str): Filename to write to.
        path       (str): Directory path to use.
    """

    output = open(path + filename + '.csv', 'wb')
    writer = csv.writer(output, quoting=csv.QUOTE_ALL, lineterminator='\n')
    for val in result:
        writer.writerow([val])
    # Print one a single row
    # writer.writerow(result)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号