Home › Browse

Write analysis code: how to do it with AI

Last checked 2026-10-15

IntermediateBot with human review 📊 Data analysis

Generate pandas/SQL notebooks you can rerun.

1. Bot automation level

Bot with human review The bot does the work, but facts, numbers or code should be checked.

2. Before you hand it to the bot

3. Copy-paste prompts

Main prompt
Write a pandas script to compute cohort retention from events.csv.
Beginner-friendly
Write a pandas script to compute cohort retention from events.csv.

I'm new to this: explain each step in plain words and ask me for anything you need before starting.
Check-your-work
Write a pandas script to compute cohort retention from events.csv.

When you finish, list any assumptions you made, anything you're unsure about, and what I should double-check before using the result.

Free tiers that can handle this (verified): ChatGPT (incl. Work & Codex), GitHub Copilot, Mistral Le Chat. Others: check plan.

4. Step-by-step

  1. Describe the dataset schema and the exact output you want.
  2. Ask for pandas or SQL code with comments and assumptions.
  3. Run it locally (or in an agent's terminal) on a sample.
  4. Compare results to a known figure.
  5. Commit the script so the analysis is reproducible.

5. Which bots and plans can do it

ToolWhat's different herePlan limitsSource
Claude (incl. Claude Code)Claude Code can run the script in your environment.Claude Code and Research need Pro or higher; computer use is Pro/Max only (research preview).code.claude.com/docs/en/desktop
ChatGPT (incl. Work & Codex)Codex or chat code execution.Free tier has limited deep research, Codex and Work; scheduled tasks need Go or higher (per chatgpt.com/pricing).help.openai.com/en/articles/20001275-chatgpt-work-and-codex
CursorAgent runs code in the terminal.Pricing page unverified; cloud agents require a connected source-control repo.cursor.com/docs/agent/overview
GitHub Copilot—Free: 2,000 completions + 50 chats; cloud agent listed on paid plans.docs.github.com/en/copilot/concepts/agents/cloud-agent/about-cloud-agent
Mistral Le Chat—Free tier has limited messages, searches and coding sessions; Pro raises limits.mistral.ai/pricing
DeepSeekFree chat for generating code; run it yourself.Chat app limits not documented officially; API is pay-per-token.api-docs.deepseek.com/quick_start/pricing

Free or paid?

6. Risks and what to double-check

Professions that use this

Data analyst · Researcher

Related tasks

Open in the interactive app