AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Excel Large File Processing And Cleaning

skill-opensensenova-sensenova-skills-structured-header-reading · by OpenSenseNova

读取多 sheet Excel 文件,动态识别目标列进行统计,并使用正则清洗文本字段提取中文字符,最终输出标准化 Excel 文件。

No reviews yet
0 installs
4 views
0.0% view→install

Install

$ agentstack add skill-opensensenova-sensenova-skills-structured-header-reading

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-opensensenova-sensenova-skills-structured-header-reading)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Excel Large File Processing And Cleaning? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Skill Steps

> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.

Step1 文本字段清洗,使用正则表达式提取纯中文字符(过滤数字、特殊符号等)。

import re

def extract_chinese(text):
    if pd.isna(text):
        return text
    # 仅保留 Unicode 中文字符范围
    chinese_chars = re.findall(r'[一-龥]', str(text))
    cleaned = ''.join(chinese_chars)
    return cleaned if cleaned else ''

clean_col = '目标清洗列' # 占位示例,如'收货人'
if clean_col in df.columns:
    df[clean_col] = df[clean_col].apply(extract_chinese)

Step2 动态模糊匹配列名,并统计该列中特定值的数量。

# 动态查找包含特定关键字的列
keyword = 'type'
target_val = 'varchar'
target_col = next((col for col in df.columns if keyword in str(col).lower()), None)

total_target_count = 0
details = []

if target_col is not None:
    # 忽略大小写和首尾空格进行匹配
    mask = df[target_col].astype(str).str.lower().str.strip() == target_val
    count = mask.sum()
    total_target_count += count
    
    if count > 0:
        details.append({
            'sheet': target_sheet,
            'target_count': count,
            'total_rows': len(df)
        })

print(f"{'='*50}")
print(f"匹配列 '{target_col}' 中值为 '{target_val}' 的总数: {total_target_count}")
print(f"{'='*50}")
for detail in details:
    print(f"  {detail['sheet']}: {detail['target_count']} 个匹配项 (共 {detail['total_rows']} 行)")

Step3 将清洗和处理后的数据保存为 Excel,并输出文件大小与下载链接。

output_path = "/mnt/data/cleaned_data_output.xlsx"
df.to_excel(output_path, index=False)

file_size = os.path.getsize(output_path)
print(f"清洗后的数据已保存至: {output_path}")
print(f"文件大小: {file_size} 字节")
# 生成标准下载链接格式
print(f"下载链接: sandbox:{output_path}")

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.