我有一个大约有2800万行(5列)的数据框架,我正在努力将其写入excel,它限制在1048576行,我不能在多个工作簿中使用它,所以我需要将这些28Mi拆分为28个工作表,以此类推
这就是我用它所做的:
writer = pd.ExcelWriter('NAME_XX-' + mes +'-' + ano + '_XXX.xlsx', engine = "xlsxwriter")
notMor.to_excel(writer, engine='xlsxwriter', index=False)
我曾想过将数据框拆分成27个不同的数据框,然后将每个数据框保存在工作簿上,但没有更简单的方法吗
简单/简单/快速>;将您的数据从Pandas下载到拆分1000000的CSV,然后让Excel打开它。Excel将相应地调整并打开多个工作表
您可以调整一些代码:
csv
,并使用行限制为1,999,999,997
的Excel数据模型导入文件。相关问题 更多 >
编程相关推荐