2021-09-29

C:\Users\lenovo\AppData\Local\Temp/ipykernel_70584/3317889059.py:10: FutureWarning: As the xlwt package is no longer maintained, the xlwt engine will be removed in a future version of pandas. This is the only engine in pandas that supports writing in the xls format. Install openpyxl and write to an xlsx file instead. You can set the option io.excel.xls.writer to 'xlwt' to silence this warning. While this option is deprecated and will also raise a warning, it can be globally set and the warning suppressed.
  df2.to_excel('./test0.xls')
  •   df.to_excel('1.xls')

    翻译:由于xlwt软件包不再维护,xlwt引擎将在未来版本的pandas中删除。这是pandas中唯一支持xls格式写入的引擎。安装openpyxl并改为写入xlsx文件。您可以设置选项io.excel.xls文件。写入“xlwt”以消除此警告。虽然此选项已弃用,并且还会引发警告,但可以全局设置它并抑制警告

    这是警告 其实已经输出了xls文件

猜你喜欢

转载自blog.csdn.net/Aplumage/article/details/120557283