What is a row? The question that changes the number
See why the same table gives 74.2% or 89.8% depending on what you count, and ask Claude Code what a row stands for before counting.
Free course. Your Maestro, an AI, .
Open planetas.csv and check how many rows it has, and you'll find 40,350. But count how many distinct planets are in that same file, and the total is 6,451.
Why are there more than six times as many rows as planets? Because in the ps table of NASA's exoplanet archive, each row records a publication about a planet: a scientific paper that measured its mass, its orbit or its size and reported that set of parameters. When a planet has been studied a lot over the years, it gets one row per publication. TrES-2 b is in 34 rows and Kepler-10 b shows up in 25. Across the whole table, only 937 planets appear exactly once; the other 5,514 have two or more rows.
What a single row stands for is called the table's Glossary word, and it's the first thing you need to know before you count, add up or compute a percentage.
What changes when you count rows or planets
Look at what happens to your first session's question depending on what you count, using the data from October 31, 2026:
| Method | Counting rows | Counting planets |
|---|---|---|
| Transit | 36,250 of 40,350: 89.8% | 4,785 of 6,451: 74.2% |
| Radial velocity | 2,961 of 40,350: 7.3% | 1,204 of 6,451: 18.7% |
Both columns come from the same table, with code that runs start to finish without errors. Still, they answer different questions. The right-hand column answers what percentage of planets were discovered with each method. The left-hand column answers what percentage of the catalog's publications are about planets found with that method.
The difference isn't spread evenly either. Planets that the Kepler and TESS telescopes discovered by transit each have many follow-up publications, so when you count rows they weigh much more (going from 74.2% to 89.8%), while the radial velocity ones drop to 7.3%, less than half their real share by planet (18.7%).
Common mistake: Several rows for one planet aren't a mistake in the table
When you see TrES-2 b show up 34 times, it's easy to think the table has duplicates by mistake and want to delete them. But those rows hold different publications, and if your question were how many published measurements each planet has, you'd need all 40,350 rows. Instead of deleting data, the table includes the default_flag column, which is 1 in exactly one row per planet (6,451 rows) and 0 in the other 33,899.
How to know where a table comes from
In your first session, Claude Code very likely found that column on its own: exploring planetas.csv, it saw the repeated names in pl_name, saw default_flag and recognized how NASA organizes its catalog. Knowing where a table came from, how it was collected and what was done to it along the way is called data provenance, and it tells you why a row looks the way it does.
The tables at your job won't always have a column like default_flag, and Claude Code won't know ahead of time how your data was captured. Think about what happens every day in an office:
- A receipt with several products takes one row per product, so the same receipt shows up several times.
- Someone who answered a survey twice shows up in two rows.
- A customer with three accounts shows up in three rows.
You know that because you know the system the file comes from, or the people who enter the data. Claude Code only knows it if you tell it or ask it to check before doing any math. If you have a table from work in mind and aren't sure what a row stands for, describe it to your Maestro.
So before you ask for a number, have it check the grain. In your session with planetas.csv, type:
Before you count anything: what does one row in planetas.csv stand for? How many rows does it have, how many distinct planets are there, and how many times does TrES-2 b show up?Compare its answer with the numbers on this page. If your first session gave you about 90% for transit, now you know what happened: it counted all 40,350 rows. Ask it to recalculate the percentage counting each planet once and to tell you which column it used. If your session gave you different numbers from the ones on this page, paste them to your Maestro.
Check the result against what you expect
There's one more check you can do without reading a single line of code: compare the result with the order of magnitude, the totals and the reference figures you already know. If you've read that there are about 6,000 confirmed exoplanets and an analysis tells you the total is 40,000, you know right away that something was over-counted. If a table's percentages go past 100%, or a count lands far from the published figure you had as a reference, you have a clear clue to ask what was counted.
With your own data you carry that same reference in your head: you know roughly how many customers, sales or people there should be in a normal month. When the number Claude Code gives you falls outside that range, the first question is always what it took as one unit.
Try it
Ask Claude Code the question in the block above in your session with planetas.csv and check that it gives you the 40,350 rows, the 6,451 planets and TrES-2 b's 34 appearances. Then answer this question: