Lesson 13 · ChatGPT Mastery Pro+ ~11 min Charts + analysis · finale

Code Interpreter: Python without typing Python.

Code Interpreter (a.k.a. Advanced Data Analysis) runs real Python on data you upload — CSVs, Excel, images, even PDFs. It cleans, analyzes, converts, and charts. If you ever waited on a data team for a one-off "quick look," this is the tool that lets you self-serve it.

The mental model

You bring the data. It writes the code.

You don't write Python — you describe the outcome, and Code Interpreter writes and runs the code in a sandbox, then hands you the files and charts. The catch, and the whole skill of this lesson, is knowing what to verify. Run one and watch.

Do it · run an analysis

Messy CSV in, clean answers out.

Here's a raw Q1 sales export — note the inconsistent dates, currency strings, and stray whitespace. Hit run and watch Code Interpreter clean, analyze, and chart it.

📄 q1-sales.csv · 412 rows
Date,Customer,Amount,Region 03/14/2026, Acme Inc , $12,400,us 2026-03-15,Globex, 8200 ,US Mar 16 2026,Initech,$4,150 ,U.S.
Output
$1.28M
Total revenue (Q1)
$4,210
Median deal size
3
Outliers flagged
Revenue by month
Jan Feb Mar $0.34M $0.45M $0.49M
Before you trust it: spot-check the cleaned rows against the original. A clean run isn't the same as correct output.
Your call · trust or verify?

The skill is knowing what to double-check.

Code Interpreter can do real statistics — and wrong statistics, with the same confidence. For each output, decide.

Good to know

Limits and where it shines.

Sandbox limits

It runs in a sandboxed Python environment with no internet — it can't fetch new data mid-task. File size caps around 512MB (varies), and sessions reset, so it won't remember yesterday's work. And always upload the actual file rather than describing it — it hallucinates column names otherwise.

1

CSV → cleaned, analyzed, charted

One prompt: fix data-quality issues, compute the stats you name, and output charts as PNGs plus a cleaned CSV.

2

Format conversion at scale

PDF tables → CSV, Excel → JSON, weird layouts → tidy data — with a "low-confidence rows" file to review.

3

Statistics without a statistician

A/B tests, significance, regression, power analysis — ask it to show the test it chose and why.

Replace one data request to your team

Think of the last time you asked an analyst for a "quick analysis." Take the underlying data, upload it to Code Interpreter, and run it yourself. Notice what works and where you'd still want a human in the loop — that calibration is the whole skill.

What you can do now

  • Upload actual files — don't describe what's in them
  • Spot-check cleaned data before trusting downstream analysis
  • Ask Code Interpreter to show its work on statistical tests
  • Know the sandbox limits: no internet, ~512MB cap, sessions reset
  • Self-serve everyday analysis; escalate high-stakes stats to an expert
🎓 Track complete

You've finished ChatGPT Mastery.

That's the full track — from email and Custom GPTs through agents, Deep Research, the API, and Code Interpreter. Keep your toolkit sharp as OpenAI ships new features, and if you want breadth, the Copilot and Claude Mastery tracks cover the same depth for other tools. Explore all tracks →

🎓
AI Coach
Ask anything about this lesson
Hey! I'm your AI Coach for this lesson. Ask me anything about what you just read — concepts, examples, how to apply it to your work. What's on your mind?
Free lesson coaching is limited to 3 questions. Upgrade to Pro for unlimited coaching on every lesson.