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

相关推荐
撞强4 小时前
Windows 上从零开始:Obsidian + Copilot(Icompify)+ 客户洞察实战 · 图文指南
windows·copilot·obsidian·icompify
weixin_571667415 小时前
Windows 通过 SSH 反向隧道向 Ubuntu 转发代理
linux·运维·windows·代理
事圆则缓5 小时前
Kotlin 集合与序列:给页面一份清楚的数据
开发语言·windows·kotlin
遇印记6 小时前
应用层,网络管理
运维·网络·windows·学习·安全
硫酸锌018 小时前
安卓手机连接Windows电脑后通过DHCP服务为手机分配IP地址
android·windows·计算机网络
ClickHouseDB9 小时前
ClickHouse .NET 驱动程序新特性:从 1.0 到 1.3 的演进之路
java·前端·windows
略懂而已20 小时前
腾讯云COS 自动同步 for windows
windows·云计算·腾讯云
weixin199701080161 天前
《抖音商品API:/product/detail 与 /product/list 的字段边界与图片合规踩坑》(附 Python 源码)
服务器·网络·windows
小杍随笔1 天前
egui 0.37 升级实录:卡顿修复与5倍性能回退
windows·rust·egui
aichitang20241 天前
QCU 2.0.0:补齐 Windows、Linux 与 GNOME Wayland
linux·运维·windows·ai·agent·ai编程