将xlsx电子表格中所有sheet合并在一起

import pandas as pd

打开xlsx文件

xlsx = pd.ExcelFile('path_to_your_file.xlsx')

读取所有sheets到一个list中

sheets = []

for sheet in xlsx.sheet_names:

sheets.append(xlsx.parse(sheet))

合并所有sheets

combined = pd.concat(sheets)

将合并后的数据写入新的Excel文件

combined.to_excel('combined_sheets.xlsx', index=False)

相关推荐
游戏开发爱好者85 分钟前
在 Windows、Linux 与 CI 环境下命令行上传 IPA 到 App Store
linux·windows·ios·ci/cd·小程序·uni-app·iphone
A懿轩A36 分钟前
【2026 最新】Python 与 PyCharm 详细下载安装教程 带图展示(Windows 版)
windows·python·pycharm
Clarice__1 小时前
Anaconda安装、使用教程
windows·python·机器学习·conda·visual studio code
cong*1 小时前
搜狗输入法云计算代理导致Windows 10鼠标指针不停转圈的解决方案
windows·计算机外设
BackCatK Chen1 小时前
编译 & 运行(Windows)
windows
A懿轩A1 小时前
【2026 最新】Java 与 IntelliJ IDEA 详细下载安装教程 带图演示(Windows 版)
java·windows·intellij-idea
luffy54591 小时前
txt文件所有数据在一列如何转多行多列
windows·excel·txt·一列转多行·一列
vortex52 小时前
Windows 环境下 MSVC 编译工具链快速安装指南
windows
软件资深者2 小时前
Win10/Win11可装的Win7经典小游戏合集
windows·microsoft·windows11
Sweet锦2 小时前
无需JVM!GraalVM打造Windows平台零依赖Java应用
java·windows·后端·云原生·开源