You open a fresh Jupyter Notebook, run df.head(), see 43 columns, and half of them have names like col_17 and Unnamed: 0. Somewhere in there is the answer to why churn spiked last quarter. You could spend the next three hours on EDA by hand — or you could hand the boring 80% to an LLM and keep the judgment calls for yourself. This roundup is about exactly that split: which prompts genuinely speed up work in Jupyter Notebook, EDA, and Pandas, and where the model quietly lies to you.
Below are prompts I actually reuse. Each one is paired against a competing approach on a single criterion, so you can see what to pick and when.
First contact with a dataset: a profile prompt vs. df.describe()
df.describe() gives you means and quartiles and tells you nothing about meaning. It will happily report that customer_age maxes out at 847. The LLM prompt is slower to set up but catches the stuff that matters. More on the topic: “Making LLMs Speak Pandas and Polars: Prompts That Clean, Join, and Speed Up Your DataFrames Without Eating RAM”.
Prompt:
Here is the output of df.dtypes, df.isna().sum(), and df.nunique() for a dataframe I just loaded. I know nothing about this data yet. For each column: guess what it represents, flag whether it looks like an ID, a category, a date stored as string, or a numeric measure, and list the three columns most likely to break a downstream groupby. Do not write code yet. Ask me anything you need.
More on the topic: “Data Science from Scratch: Why 500 Clean Rows Beat 50,000 Dirty Ones — Debunking the "More Data Is Better" Myth”.
What you get back is a triage list. In practice the useful part is the third column of the answer — the model spots that signup_date is object dtype and that country has 400 unique values in a table with 900 rows, which means it is dirty. describe() will never tell you that.
Pick the prompt when the schema is unfamiliar. Pick describe() when you already know the columns and just need a quick sanity check on ranges.
Anomaly hunting: a statistical prompt vs. a narrative prompt
Two ways to ask an LLM about outliers, and they fail differently.
The statistical route asks the model to reason about rules you give it — IQR, z-score, hard business bounds. It is reproducible and you can defend it in a code review. More on the topic: “Power BI — Business Analytics and Data Visualization: How to Stop Building Reports Manually and Avoid Drowning in Numbers”.
Prompt:
For the numeric columns listed below, propose an outlier rule per column: IQR with a stated multiplier, z-score threshold, or a hard domain bound. For each, justify the choice in one sentence based on the column's likely distribution (skewed revenue vs. bounded rating). Then give me a single Pandas snippet that flags rows per column into a boolean mask dataframe, no loops.
The narrative route asks the model to find anomalies itself from a sample. It catches things rules miss — a cluster of users all created within the same 90 seconds — but it hallucinates patterns in random noise if you let it.
Use the statistical prompt for anything that feeds a report or a model. Use the narrative prompt as a first pass on a fresh table, then convert whatever it finds into an explicit rule before you believe it.
A common mistake: running the narrative prompt on a 30-row sample, getting three "anomalies" back, and deleting those rows. On a sample that small, three unusual-looking rows is just what randomness looks like. Ask for the rule, then apply it to the full frame.
More on the topic: “Data Science Prompts That Actually Work: 12 Recipes from EDA to Feature Engineering That Turn an LLM Into a Real Analyst Partner”. More on the topic: “Data Science and Machine Learning: A Realistic Step-by-Step Plan — Python, Statistics, Models and Getting Them Into Production”.
Pandas code: write-it-for-me vs. explain-this-line
Asking an LLM to write a merge is fast and occasionally catastrophic — silent row multiplication from duplicate keys is the classic. Asking it to explain a line you inherited is slower but has almost no failure mode.
For generation, the prompt that actually holds up is the one that forces the model to state its assumptions first:
I need to join orders (order_id, customer_id, amount) with customers (customer_id, region). Before writing code: state what could go wrong with this join, what the expected row count is relative to orders, and how you would verify it. Then write the merge and a one-line assertion that checks your own prediction.
That last clause is the whole trick. The model predicts a row count, then writes assert len(merged) == len(orders) and you catch the duplication the moment it happens instead of three cells later.
For explanation, paste the line and ask what it does and what it silently drops — dropna() on a subset, groupby without observed=True on a categorical, a timezone-naive timestamp comparison. Generation is for boilerplate you will review. Explanation is for code you did not write and cannot yet trust.
Visualization: "chart this" vs. "tell me what chart would show the gap"
"Plot revenue by month" gets you a line chart. It does not get you insight. More on the topic: “Your Excel Chart Is Not an Analysis: LLM Prompts That Hunt Anomalies Before You Draw Anything”.
The better prompt separates the design decision from the code:
I want to show whether the churn rate differs between customers acquired via paid channels and organic ones, over the last 12 months. First, recommend a chart type and explain in two sentences why it beats the alternatives for this question. Then give me matplotlib code that produces it, with the paid vs. organic series readable at a glance.
More on the topic: “Time Series Analysis: Why Prophet and ARIMA Break Where You Least Expect It”.
Why bother? Because the model's first instinct — a grouped bar chart — often hides a trend that a two-line plot would make obvious. Forcing it to argue for the chart type makes it commit, and you can disagree before any code is written.
Interpreting a model: the summary prompt vs. the interrogation prompt
After model.fit(), the tempting move is to ask the LLM to "interpret the results." It will produce a confident paragraph about feature importance that sounds like it read the data. It read your numbers and filled the gaps with plausible story. More on the topic: “Data Visualization: Why Most Charts Fail and How to Build Ones That Actually Work”.
The interrogation version is harder to abuse:
Here are my metrics: accuracy 0.91, precision 0.62, recall 0.38 on the positive class, plus the confusion matrix. Do not explain what these metrics mean in general. Tell me specifically what this combination implies about the model's behavior, what business cost that pattern maps to, and what I should check next before trusting it. Flag anything in these numbers that is inconsistent with a healthy model.
That last sentence is where the value is. A 0.91 accuracy with 0.38 recall on an imbalanced set is a model that predicts the majority class and looks great on a slide — and the interrogation prompt is far more likely to say so than the summary prompt.
Summary prompts are for stakeholders who need a sentence. Interrogation prompts are for you, before you show anyone the number.
| Task | LLM does well | Still needs a human |
|---|---|---|
| Schema triage | Naming likely column meanings, spotting dirty dtypes | Knowing what the business actually measures |
| Anomalies | Proposing rules, catching obvious clusters | Deciding whether an outlier is an error or a signal |
| Pandas code | Boilerplate merges, reshaping, assertions | Verifying join cardinality on real keys |
| Charts | Choosing chart type, writing matplotlib | Deciding which question the chart answers |
| Model readout | Flagging inconsistent metric combos | Judging whether the model is fit to ship |
Where the notebook ends and the person begins
The pattern across every prompt above is the same: the LLM is excellent at proposing — a rule, a chart, an explanation, an assertion — and unreliable at deciding. It will generate a plausible story about your data whether or not the story is true, and it will do so in the same confident tone either way.
So keep the loop short. Let it draft the EDA profile, the outlier rule, the merge with its own assertion, the chart argument, the metric interrogation. Then read the output the way you read a junior analyst's first draft: fast, but with your hand on the keyboard. The three hours you save on boilerplate are the three hours you spend on the one question that actually mattered — and that question was never in the DataFrame.