cd /news/developer-tools/turn-plain-english-into-pandas-code-… · home topics developer-tools article
[ARTICLE · art-99197] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

Turn plain English into pandas code — with AST validation (free tool)

A developer has built a free tool that converts plain English descriptions into syntax-validated pandas code, using AST validation to catch errors and block dangerous operations. The tool includes 22 curated few-shot examples, schema awareness for CSV uploads, and a free tier of 5 queries per day per IP.

read1 min views1 publishedAug 17, 2026

If you use pandas daily, you have probably burned minutes hunting for the right syntax. .agg()

takes a dict or a list? .rolling()

then .mean()

— what is the window arg called?

I built a tool: describe what you want in English, get syntax-validated pandas code back.

Input:

Group sales by month, calculate total revenue and average order size

Output:

df['month'] = df['date'].dt.to_period('M')
result = df.groupby('month').agg(
    total_revenue=('revenue', 'sum'),
    avg_order_size=('order_size', 'mean')
).reset_index()

Note it auto-handled the datetime conversion — easy to miss on first write, then 10 minutes of debugging.

Three pieces, no black magic:

Few-shot examples (22 curated patterns): groupby+agg, merge/join, datetime, string ops, missing values, pivot, viz, binning, filtering, chaining. Not a generic LLM wrapper — tuned for pandas.

Schema-aware: upload a CSV or describe columns, and it knows df['date']

is datetime, df['user_id']

is string. No placeholder columns.

AST validation: runs ast.parse()

before returning. If the model hallucinates a nonexistent method, the validator flags it. You never get syntax-broken code — and it scans for dangerous ops (eval

, exec

, subprocess

, os.remove

).

7-day rolling average:

df['rolling_avg'] = df['close'].rolling(window=7).mean()

Quartile bins:

df['income_quartile'] = pd.qcut(df['income'], q=4, labels=['Q1','Q2','Q3','Q4'])

Correlation heatmap:

import seaborn as sns
sns.heatmap(df.corr(numeric_only=True), annot=True, cmap='coolwarm')

Honest value prop: saves the 20-30% of time spent on syntax lookup, so you spend it on the 70-80% that matters — understanding your data and reading results.

Free tier: 5 queries/day per IP, no signup.

Type a data operation in English, get validated pandas code. If you hit a pattern it handles well (or badly), tell me in the comments — the edge cases on messy real-world data are what I care about most.

── more in #developer-tools 4 stories · sorted by recency
── more on @pandas 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/turn-plain-english-i…] indexed:0 read:1min 2026-08-17 ·