[英]Saving set of data into excel file [duplicate]
im trying to save an output that i have calculated using python pandas, i have used tabulate to organize the output, but when im writing the output into an excel file, it won't open, and error message from excel appears, i have opened使用教科書和 output 的文件是正確的
writer = open(file='Company.xlsx',mode='w') writer.writelines(tabulate(result))
Could you not use the Pandas DataFrame to_excel function to save the output to an Excel file?
使用 Pandas 或 xlsxwrite 和 Xlrd 等其他庫。
df.to_excel('blabla.xlsx')
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.