簡體   English   中英

將數據集保存到 excel 文件中 [重復]

[英]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))

這是使用文本文件時的 output

這是來自 excel 的錯誤消息

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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM