One - One Code All

Blog Content

python写csv文件

Python   2011-11-19 19:40:03
with open('score.csv', 'w', newline='') as f:
    csv_write = csv.writer(f)
    list_header = ['KEY', 'VALUE']
    csv_write.writerow(list_header)

    for key in data_columns:
        value = 'abc'
        list_tmp = [key, value]
        csv_write.writerow(list_tmp)



上一篇:悟道方知天命,修行务取真经---《天道》五台论经(转)
下一篇:从np.random.normal()到正态分布的拟合

The minute you think of giving up, think of the reason why you held on so long.