QC3 NumericDataThresholdCheck

From cas-bigdatalab/piflow · View interactive version

QC3 NumericDataThresholdCheck is an AI agent skill from the GitHub repository cas-bigdatalab/piflow. 数值数据阈值检验工具。读取结构化数据文件(CSV、TSV、Excel等),检查数值字段是否在指定的门限范围内,不允许超出门限值之外,最后输出为同格式的文件。当用户需要对数据进行阈值检验、数值范围检查、数据质量控制等操作时使用此skill。

How to use this skill

Skill file

QC3_NumericDataThresholdCheck

功能说明

该skill提供数值数据阈值检验的能力,具体包括:

  1. 读取结构化文件:支持 CSV、TSV、Excel 等多种格式的结构化数据文件
  2. 数值阈值检验:将被检验表中的属性项值与门限比对,检查是否在门限范围
  3. 输出结果:将检验后的数据输出为同格式的文件

核心功能

1. 数值数据阈值检验

通过执行 QC3_NumericDataThresholdCheck.py 脚本,读取输入文件,检查数值字段是否在指定的阈值范围内,并输出处理后的文件。

调用方式:

python scripts/QC3_NumericDataThresholdCheck.py --input_path <输入文件路径> --origin_output_path <输出文件路径> --field_name <字段名> --max_value <最大值> --min_value <最小值> --qc_mark <QC标记>

参数说明:

使用示例:

# 检查 DBH 字段在 0-100 之间
python scripts/QC3_NumericDataThresholdCheck.py --input_path data.csv --origin_output_path output.csv --field_name DBH --max_value 100 --min_value 0 --qc_mark "DBH阈值检验"

脚本说明

QC3_NumericDataThresholdCheck.py

data_io.py

注意事项

  1. 确保输入文件存在且格式正确
  2. 阈值配置格式必须为 字段名:最小值-最大值,多个字段用逗号分隔
  3. 输出路径需要有写入权限
  4. 脚本在用户本地执行,依赖 Python 环境
  5. 支持 Windows 和 Linux 系统

依赖

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.