Reference: https://blog.csdn.net/Jarry_cm/article/details/99633562 [Python] DataFrame output as csv\txt\xlsx file
https://blog.csdn.net/toshibahuai/article/details/79034829 pandas' to_csv() usage method
DataFrame export to csv file
outputpath = 'result_test.csv'
# outputpath是保存文件路径
df1.to_csv(outputpath,sep=',',index=False,header=True)
# df1是你想要输出的的DataFrame
# index是否要索引,header是否要列名,True就是需要