1. 程式人生 > >python 建立csv檔案

python 建立csv檔案

    Acc_csv_head =['a']
    with open('data_a.csv','w',newline='') as f:
        csv_write = csv.writer(f)
        csv_write.writerow(Acc_csv_head)
        csv_write.writerows(zip(energylist))
    f.close()