원클릭으로
data-analysis
Inspect, filter, and summarize JSON, CSV, and log data using jq, awk, and pandas.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Inspect, filter, and summarize JSON, CSV, and log data using jq, awk, and pandas.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Navigate large codebases and make surgical edits while following project conventions. Use for refactors, feature work, and bug fixes spanning multiple files.
Read and edit Microsoft Word documents (.docx). Use for document editing and content extraction.
Branch, commit, rebase, and resolve conflicts. Use for PR prep, conventional commit messages, and history cleanup.
Author and edit README, CHANGELOG, and other markdown documentation, following the project's existing style.
Extract text, merge, split, and search PDF documents. Use whenever the user mentions a PDF file.
Read, write, and transform CSV and XLSX files. Use for Excel, tabular data, bulk row edits, and column transforms.
| name | data-analysis |
| description | Inspect, filter, and summarize JSON, CSV, and log data using jq, awk, and pandas. |
sqlite3 or psqlhead -n 20 /path/to/file before processing large files.jq via execute_shell.awk for simple column operations; pandas via run_code for multi-step transforms.Count lines / rows:
wc -l data.csv
jq 'length' data.json
Inspect JSON structure:
jq 'keys' data.json # top-level keys
jq '.[0]' data.json # first element
jq 'type' data.json # "array" | "object"
Filter JSON array:
jq '.[] | select(.status == "active")' data.json
jq '[.[] | select(.score > 80)]' data.json
Extract fields:
jq '.[] | {name, score}' data.json
jq -r '.[] | [.name, .score] | @csv' data.json # CSV output
Group and count in JSON:
jq 'group_by(.category) | map({category: .[0].category, count: length})' data.json
Sum a CSV column with awk:
awk -F',' 'NR>1 {sum += $3} END {print sum}' data.csv # sum column 3 (skip header)
Count distinct values in a CSV column:
awk -F',' 'NR>1 {print $2}' data.csv | sort | uniq -c | sort -rn
Filter CSV rows by column value:
awk -F',' '$3 == "active" {print}' data.csv
Pandas: full summary (run_code):
import csv
from collections import Counter, defaultdict
path = "/path/to/data.csv"
with open(path, newline="", encoding="utf-8-sig") as f:
rows = list(csv.DictReader(f))
print(f"Rows: {len(rows)}")
if rows:
print(f"Columns: {list(rows[0].keys())}")
# Value counts for first column
col = list(rows[0].keys())[0]
counts = Counter(r[col] for r in rows)
print(f"\nTop values in {col!r}:")
for val, n in counts.most_common(10):
print(f" {val}: {n}")
NDJSON (newline-delimited JSON):
jq -s '.' data.ndjson # parse as array
jq -s 'length' data.ndjson # count objects
jq -sc '.[] | select(.level == "error")' data.ndjson # filter
Extract log timestamps and messages:
grep "ERROR" app.log | awk '{print $1, $2, $0}' | head -20
jq is not always installed — check with command -v jq. If missing, install via package manager or use Python's json module.awk column indices are 1-based (not 0).awk — use csv module via run_code instead.head -n 100000 before full processing.pandas is a third-party package not available in run_code — use stdlib csv + collections instead.references/jq-recipes.md — comprehensive jq examplesscripts/csv_summary.py — column stats, null counts, value distributions