返回顶部
c

csv-toolkit

Manipulate CSV files from the command line — view, filter, sort, select columns, convert CSV to/from JSON, compute statistics, deduplicate, and merge files. Use when the user needs to work with CSV data, inspect a spreadsheet export, clean up tabular data, convert formats, or get quick column stats. Zero external dependencies.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
179
下载量
0
收藏
概述
安装方式
版本历史

csv-toolkit

# CSV Toolkit Command-line CSV manipulation — view, filter, sort, select, convert, stats, dedup, and merge. Pure Python, no dependencies. ## Quick Start ```bash # View as formatted table python3 scripts/csv_toolkit.py view data.csv python3 scripts/csv_toolkit.py view data.csv --head 10 # Filter rows python3 scripts/csv_toolkit.py filter data.csv -w 'age>30' 'city==Chicago' # Sort python3 scripts/csv_toolkit.py sort data.csv --by salary --desc # Select columns python3 scripts/csv_toolkit.py select data.csv -c "name,email,salary" # Convert to JSON python3 scripts/csv_toolkit.py to-json data.csv -o data.json # Convert JSON back to CSV python3 scripts/csv_toolkit.py from-json data.json -o data.csv # Column statistics python3 scripts/csv_toolkit.py stats data.csv -c "age,salary" # Remove duplicates python3 scripts/csv_toolkit.py dedup data.csv -o clean.csv # Merge files python3 scripts/csv_toolkit.py merge file1.csv file2.csv -o combined.csv ``` ## Commands | Command | Description | |---------|-------------| | `view` | Display CSV as a formatted table. Use `--head N` / `--tail N` to limit rows. | | `filter` | Filter rows with `-w` conditions: `col>val`, `col==val`, `col!=val`, `col<=val`. Multiple conditions = AND. | | `sort` | Sort by column with `--by col`. Add `--desc` for descending. Numeric-aware. | | `select` | Pick columns with `-c "col1,col2"`. | | `to-json` | Convert CSV to JSON array of objects. Auto-detects numbers. | | `from-json` | Convert a JSON array of objects to CSV. | | `stats` | Column statistics: count, unique values, min/max/mean/median for numeric columns. | | `dedup` | Remove duplicate rows. | | `merge` | Concatenate multiple CSV files (same headers). | ## Global Options | Flag | Description | |------|-------------| | `-d, --delimiter` | Field delimiter (default: `,`). Use `-d '\t'` for TSV. | | `--encoding` | File encoding (default: `utf-8`). | | `-o, --output` | Write result to file instead of stdout. |

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 csv-toolkit-1776096738 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 csv-toolkit-1776096738 技能

通过命令行安装

skillhub install csv-toolkit-1776096738

下载 Zip 包

⬇ 下载 csv-toolkit v1.0.0

文件大小: 5.5 KB | 发布时间: 2026-4-14 11:21

v1.0.0 最新 2026-4-14 11:21
Initial release of csv-toolkit.

- Manipulate CSV files via command line: view, filter, sort, select columns, deduplicate, and merge.
- Convert CSV data to/from JSON.
- Compute column statistics including count, unique, min, max, mean, and median.
- Supports custom delimiters, file encoding, and output files.
- Pure Python implementation with zero external dependencies.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部