| name | data-analyst |
| description | Analyze a CSV, TSV, JSON, or Parquet data file with pandas — summary stats, grouping, filtering, and optional charts saved as PNG. Use when a task involves understanding, aggregating, or visualizing tabular data in the workspace or at a URL. |
| metadata | {"homepage":"https://github.com/bradflaugher/LFG"} |
data-analyst
Explore and summarize tabular data with pandas and numpy (preinstalled).
For charts, render with matplotlib pulled on demand via uv so nothing has to
be installed ahead of time.
Workflow
-
Profile the data first so you know what you're working with:
python3 /skills/*/data-analyst/scripts/profile.py /workspace/data.csv
It prints shape, column dtypes, null counts, and .describe(). It accepts
.csv, .tsv, .json, and .parquet, and a local path or an http(s)://
URL.
-
Answer the question with a small, purpose-built script. Write it to
/workspace/analysis.py, run it, and iterate. Example pattern:
import pandas as pd
df = pd.read_csv("/workspace/data.csv")
top = (df.groupby("category")["amount"].sum()
.sort_values(ascending=False).head(10))
print(top.to_markdown())
-
Visualize (optional). matplotlib and seaborn are preinstalled in the
sandbox:
python3 /workspace/chart.py
Save figures with plt.savefig("/workspace/chart.png", dpi=150, bbox_inches="tight").
-
Report. Write findings to /workspace/report.md: the question, the
numbers (as markdown tables), any chart filenames, and a one-line takeaway.
Round sensibly and state units.
Rules
- Look at the data before trusting it: check dtypes, nulls, and obvious
outliers. Note any data-quality caveats in the report.
- Show the numbers that back each claim — never assert a trend you didn't
compute.
- Keep generated artifacts in
/workspace so the caller gets them.