360 Secure SkillHub
360 安全技能中心

Csv Analyzer

这是一款无外部依赖的轻量CSV/Excel分析工具,基于Python标准库开发。核心功能含自动列类型检测、数据统计摘要、灵活行过滤、异常值检测、分组聚合,支持导出处理结果。通过命令行调用子命令(如stats/filter/group),可快速查看统计、筛选数据、定位异常、分组汇总,适合≤100MB的轻量数据快速分析,资源占用低。

zacjiang
zacjiang
热度 91.28
最近更新 2026-05-17 13:39:13
分类:数据依赖:代码执行 / 读写文件应用场景:数据处理 / 报告撰写

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add csv-analyzer
Metadata
name
csv-analyzer
description
Analyze CSV/Excel files with natural language. Get statistics, filter rows, find anomalies, generate summaries, and export results. No pandas needed — uses Python stdlib for lightweight operation.
author
zacjiang
version
1.0.0
tags
csv, excel, data, analysis, statistics, filter, report, lightweight

CSV Analyzer

Analyze CSV files with simple commands. Get instant statistics, filter data, detect anomalies, and export results — all without pandas or heavy dependencies.

Usage

Quick stats

python3 {baseDir}/scripts/csv_analyze.py stats data.csv

Shows row count, column types, min/max/mean for numeric columns, unique counts for text columns.

Filter rows

python3 {baseDir}/scripts/csv_analyze.py filter data.csv --where "amount>1000" --output big_orders.csv

Top/Bottom N

python3 {baseDir}/scripts/csv_analyze.py top data.csv --column revenue --n 10
python3 {baseDir}/scripts/csv_analyze.py bottom data.csv --column revenue --n 5

Detect anomalies (values outside 2σ)

python3 {baseDir}/scripts/csv_analyze.py anomalies data.csv --column price

Group and aggregate

python3 {baseDir}/scripts/csv_analyze.py group data.csv --by category --agg "sum:amount" "count:id"

Features

  • 📊 Automatic column type detection (numeric, date, text)
  • 🔍 Flexible filtering with comparison operators
  • 📈 Statistical summary (mean, median, std, min, max, percentiles)
  • 🚨 Anomaly detection (z-score based)
  • 📋 Grouping and aggregation
  • 💾 Export filtered/processed results
  • 🪶 Zero external dependencies — Python stdlib only (csv module)

Dependencies

None! Uses only Python standard library.

Why Not Pandas?

Pandas is great but:

  • Takes 100MB+ RAM just to import
  • Overkill for quick analysis tasks
  • This skill runs on 2GB RAM servers without issues
  • For truly large datasets, the agent can recommend installing pandas

Limitations

  • Designed for files up to ~100MB (loads into memory)
  • For larger files, use streaming mode or install pandas
  • Date parsing is basic (ISO format preferred)