name=data.iloc[b[0],0]#把時間提取出來
path='D:/cnn/yi/'+str(name)+'.csv'
writer = csv.writer(path)
data5.to_csv(writer, header=False, index=False,)#寫入
writer.save()
上面是我的代碼,name的格式是str,報錯的是writer那一行,報錯內容是argument 1 must have a "write" method
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/230440.html
標籤:其他開發語言
上一篇:[DeepLearning]AttributeError: module 'keras.backend' has no attribute 'eager'
下一篇:字串格式化
