Generate a small dataset and a NumPy or Pandas exercise built around it, with a fully worked solution explained line by line.
You are a data analysis tutor who builds every exercise around a dataset small enough to read in full at a glance, since a beginner learning Pandas syntax shouldn't also be fighting to understand a thousand-row dataset at the same time. My library is [LIBRARY:select:NumPy,Pandas,both together]. My topic is [TOPIC], described in plain language, such as filtering rows by a condition, grouping and aggregating data, or basic array indexing and slicing. If I left that blank, pick one common beginner topic for [LIBRARY] and name which one you picked and why instead of silently choosing. Generate a small dataset by hand, six to twelve rows for Pandas or a similarly small array for NumPy, realistic enough to be interesting, such as sales figures for a handful of products or scores from a handful of students, and print it in full before the exercise so I can see exactly what I'm working with. Then write one specific exercise question using that exact dataset, tied directly to [TOPIC], not a vague instruction like explore the data. Give me a chance to attempt it by stating the exercise clearly and stopping there first, without immediately supplying the answer, unless I explicitly ask you to skip straight to the solution. When I ask for the solution, or if I said to skip straight to it, write the working code, then walk through it line by line, what each method call does to the data, what the intermediate result looks like at that point, and why that method was the right choice for [TOPIC] over a superficially similar alternative, such as why iterating with apply was avoided in favor of a vectorized operation. My difficulty is [DIFFICULTY:select:beginner,intermediate]. If I chose intermediate, make the exercise require chaining two or more operations together instead of a single method call, and explain the order the operations must run in and why reversing that order would change or break the result. If I ask for another exercise on the same [TOPIC], generate a new dataset and a new question instead of reusing the same one, so repeated practice doesn't become memorizing one specific answer.
Use this prompt anywhere
10,000+ expert prompts for ChatGPT, Claude, Gemini, and wherever you use AI.
Get Early AccessReal-world datasets are the wrong place to learn Pandas syntax for the first time, a thousand rows hides the exact moment a filter or groupby does something you didn't expect. This tool builds a dataset small enough to read in full, six to twelve rows, then writes one exercise tied to exactly the operation you're trying to learn.
Set [LIBRARY] to NumPy, Pandas, or both, and describe [TOPIC], filtering rows, grouping and aggregating, array slicing, whatever you're stuck on. The dataset prints in full before the question, so you can see exactly what you're working with, and the exercise stays specific instead of a vague explore the data prompt. Attempt it yourself first. Ask for the solution and it walks through the code line by line, what each method does to the data, what the result looks like at that step, and why that method beat a similar-looking alternative. Set [DIFFICULTY] to intermediate for exercises that chain two or more operations with the required order explained.
Ask for another one on the same topic and you get a fresh dataset and question, not the same answer to memorize. Once the syntax clicks, run it for real in the Jupyter notebook lesson generator, or move from tables to relational data in the SQL join practice generator.
Build it in the Dock Editor to keep a running set of exercises and solutions as you practice.
Drop this into the Dock Editor, ChatGPT, Claude, or Gemini, then set [LIBRARY] to NumPy, Pandas, or both together, depending on which one your course or project actually needs right now.
Fill in [TOPIC] with the specific operation you're stuck on, filtering, grouping, indexing, aggregating, so the exercise targets it directly.
A hand-built dataset of six to twelve rows prints in full before the question, small enough to reason about without losing track of it.
The question is stated clearly and the answer waits until you ask for it, so you get a real chance to work through it before seeing the solution.
Each line of the worked solution gets explained, what it does, what the data looks like at that point, and why that method beat the alternatives.
Build small, readable practice sets for exactly the Pandas method a lecture just introduced, before touching a real, messy dataset.
Get extra reps on filtering, grouping, or indexing between course modules without waiting for the next assigned dataset.
Generate several fresh exercises on the same weak topic in a row to build real fluency instead of memorizing one dataset's answer.
Practice the exact NumPy and Pandas operations that show up constantly in real data work, filtering, grouping, aggregating, on data small enough to fully understand.
Discover more prompts that could help with your workflow.
Build a small working program that calls a real public API, with the request, response, and API key setup explained step by step.
Explain a core functional programming idea, such as pure functions or immutability, with a broken code example and its fixed version shown side by side.
Explain a built-in math function, square root, power, absolute value, or rounding, covering math and syntax, then generate practice calls to predict before revealing results.
10,000+ expert-curated prompts for ChatGPT, Claude, Gemini, and wherever you use AI. Our extension helps any prompt deliver better results.