我需要你的帮助,将我的集群从数组中保存到CSV文件中,并将其列为
我对CSV的期望是这样的
text || label
car || vehicle
cup || stuff
这是我的代码
import csv
row=[["TEXT","LABEL"],
Corpus['text_final'],Corpus['tags']]
with open('text_label.csv', 'w', newline='') as file:
writer = csv.writer(file)
writer.writerows(row)