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

相关推荐
love530love5 分钟前
FaceLift 单图 3D 人脸重建项目 Windows 11 完整部署指南
人工智能·windows·python·3d·facelift
CyL_Cly17 小时前
杀戮尖塔2mod:二次元猎宝
windows·游戏
不做菜鸟的网工20 小时前
Windows WSL 使用技巧
windows
heimeiyingwang1 天前
【架构实战】Event Sourcing事件溯源详解
windows·架构
少控科技1 天前
小数典 - V1.0.0.1
windows·c#
遇见火星1 天前
Firewalld 防火墙实战指南 + TCPWrapper 七层访问控制
开发语言·windows·python
eastyuxiao1 天前
MMM 工具一键去水印+检测 批处理脚本(Windows/Mac 双版本)
人工智能·windows·macos·ai音乐去水印
Ching·1 天前
MAC mini上面安装虚拟机windows11的安装详细过程及其问题解决
windows·macos·wmware fusion
Controller-Inversion1 天前
207. 课程表
windows
longerxin20201 天前
卸载 CCleaner 失败?用 Revo Uninstaller 彻底清干净(附官方下载 + 详细步骤)
windows