Missing Value Remover
Documentsmissing_value_removerMissing Value Remover is an Agent Skill for documents published in the cas-bigdatalab/piflow repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
缺失值删除工具。读取结构化表格或 JSONL 数据,删除包含缺失值的行或删除缺失比例过高的列;不负责缺失值填充。 当用户提到删除缺失值、删除空值行、删除空值列等需求时使用此skill。 适用于科研表格和结构化数据的缺失清理,不负责插值、补值、均值填充或其他修复操作。
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/cas-bigdatalab/piflow/blob/HEAD/workspace/skills/missing_value_remover/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/missing-value-remover, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Missing Value Remover 缺失值删除 Skill
功能概述
本skill用于删除数据中包含缺失值的行或列:
- drop:删除包含任何缺失值的行
- drop_cols:删除缺失比例超过阈值的列
输入文件格式
支持以下结构化文件格式:
- CSV
- TSV
- Excel(.xlsx / .xls)
- JSON
- JSONL
不支持的文件格式会直接报错拒绝,不会自动猜测格式;如需处理其他格式,请先转换为以上支持格式后再使用本skill。
使用方法
删除含缺失值的行
python scripts/run_missing_value_remover.py \
--input data.csv \
--output cleaned.csv \
--strategy drop
删除缺失严重的列
python scripts/run_missing_value_remover.py \
--input data.csv \
--output cleaned.csv \
--strategy drop_cols \
--threshold 0.5
参数说明
| 参数 | 必填 | 说明 |
|---|---|---|
--input | 是 | 输入文件路径 |
--output | 是 | 输出文件路径 |
--columns | 否 | 处理字段,逗号分隔 |
--strategy | 否 | 删除策略,默认"drop" |
--threshold | 否 | 删除阈值,默认0.5 |
环境要求
pip install pandas numpy openpyxl