将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)

相关推荐
bug_rabbit18 分钟前
pytest-html 中文乱码问题终极解决方案(Windows版)
windows·html·pytest
Once_day20 分钟前
Windows技巧(1)多网卡下路由和DNS配置
windows·路由配置·多网卡
mgaofeid26 分钟前
强制开启安全模式下的 Installer 服务-安全模式下卸载软件
windows
氦客40 分钟前
Windows 安装 Claude Code 并接入 GLM5.0 大模型,实现 CLI AI 编程
windows·ai编程·cli·ai coding·coding plan·命令行编程·glm5.0大模型
郁大锤2 小时前
Windows 环境下安装 Python 与环境变量配置
开发语言·windows·python
武藤一雄10 小时前
从零构建C# OOP 知识体系
windows·microsoft·c#·.net·.netcore·oop
LSL666_18 小时前
MybatisPlus条件构造器(下)
java·开发语言·windows·mybatisplus
手揽回忆怎么睡20 小时前
win11显卡NVIDIA GeForce GTX 1660的ComfyUI_windows_portable_nvidia_cu126的节点包安装不上
windows
AxureMost20 小时前
Windows系统调校 20260324 系统优化工具
windows
NGBQ1213820 小时前
ZBrush-2026.0.0-x64-CN-Portable.exe 全解析:Windows 端专业数字雕刻与绘画软件深度指南
windows·数字雕刻·zbrush