标签:
import numpy as np
import pandas as pd
import time
import datetime
import csv
os.chdir(r"D:\jczj\Desktop\项目\德甲")
allgame2=pd.read_excel(r"D:\jczj\Desktop\项目\德甲\yuce_dejia.xlsx")
写入csv
import csv
value=[]
for i in range(3):
a=i+1
b=i*i
v=(a,b)
print(v)
value.append(v)
print(value)
with open (‘aa.csv‘,‘w‘,newline=‘‘) as data:
bb=csv.writer(data,dialect=(‘excel‘))
bb.writerow([‘a‘,‘b‘])
bb.writerows(value)
data.close()
标签:
原文地址:http://www.cnblogs.com/zhangbojiangfeng/p/5971602.html