large-excel-analysis-and-formatting
Installation
SKILL.md
Skill Steps
Step1 读取Excel文件,统计所有Sheet的总行数。若数据量过大(如≥1万行),则转换为Parquet格式以显著提升后续读取和分析效率。
import pandas as pd
file_path = "input.xlsx"
xls = pd.ExcelFile(file_path)
total_rows = 0
# 统计所有 sheet 的总行数
for name in xls.sheet_names:
df_temp = pd.read_excel(file_path, sheet_name=name, header=None)
total_rows += len(df_temp)
print(f"总行数: {total_rows}")