cas-bigdatalab/piflow/data-split-by-field

Claude Code and agent skill by cas-bigdatalab/piflow

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

'按字段拆分数据工具。根据指定字段的值将结构化表格拆分为多个文件,每个唯一值对应一个输出文件。

Install

npx vskill@latest install cas-bigdatalab/piflow/data-split-by-field

SKILL.md

Data Split By Field 按字段拆分数据 Skill

功能概述

本skill用于根据指定字段的值将结构化表格拆分为多个文件。每个唯一的字段值会生成一个独立的输出文件, 文件名包含字段值以便识别。

触发条件

当用户请求以下任务时,应使用此skill:

  • 按字段拆分数据
  • 分组导出
  • 分类导出
  • 数据分片
  • 按某列值分割文件

核心参数说明

必需参数
  • --input:输入文件路径
  • --output_dir:输出目录路径
  • --split_field:用于拆分的字段名
可选参数
  • --output_prefix:输出文件名前缀,默认 split
  • --output_format:输出文件格式,默认 csv
  • --use_dask:是否使用Dask处理大数据,默认 False
  • --blocksize:Dask分块大小,默认 64MB

输入文件格式

输入文件可以是 CSV、TSV、Excel 或 SPSS 文件,且必须包含 split_field 对应的列。

使用方法

bash
python scripts/run_data_split_by_field.py --input data.csv --output_dir ./output --split_field category

输出示例

text
[OK] Data split completed!
Engine: pandas
Input file: data.csv
Split field: category
Total rows: 1000
Unique values: 5
Output files:
- ./output/split_cat1.csv (200 rows)
- ./output/split_cat2.csv (300 rows)

环境要求

  • Python 3.10+
  • pandas
  • openpyxl、xlrd、pyreadstat 等按输入格式需要安装
  • 可选:dask

注意事项

  1. 拆分字段必须存在于数据中
  2. 输出文件名格式为:{prefix}_{field_value}.{format}
  3. 字段值中的特殊字符会被替换为下划线
  4. 输出目录不存在时会自动创建

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/cas-bigdatalab/piflow/data-split-by-field/badge)](https://verified-skill.com/skills/cas-bigdatalab/piflow/data-split-by-field)

Something wrong with this skill or its page? Tell us.