由于您使用Windows,请考虑使用Jet/ACE SQL引擎(Windows .dll文件)来查询Excel工作簿并导出到CSV文件,...
""" Find the largest Python source file on the module import search path. Skip already-...
")returntry:# 读取CSV文件data=pd.read_csv(csv_file)print("读取的CSV数据如下:")print(data)# 将数据转换为Excel文件data.to_excel(excel_file,index=False)print(f"{csv_file}文件已成功转换为{excel_file}文件!")exceptExceptionase:print(f"转换...
python csv转换为excel,importpandasaspdimportopenpyxldefcsv_to_xlsx_pd():csv=pd.read_csv(r'C:1.csv',encoding='utf-8')csv.to_excel(r'C:\1.xlsx',sheet_n
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: yinzhuoqun @site: http...