For Python learners & researchers
A real question.
A small script.
How many Nobel chemistry recipient records are listed for each year? Start with a CSV, write a short analysis, and learn why counting rows is only part of the answer.
Python 3 · Standard library only · No API key for the sample
Count records.
Then question the count.
| Year | Recipient records |
|---|---|
| 2013 | 1 |
| 2014 | 3 |
| 2015 | 3 |
| 2016 | 3 |
The 2013 count reflects a partial year in this sample. These are sample-row counts, not a claim about all laureates or prizes in those years.
Run it against a local file
CSV in.
A first result out.
Save the download as nobelwinnerschemistry.csv beside your script. The Nobel Prize Winners in Chemistry dataset includes Year, FullName, and Country.
The script validates that Year is numeric and stops if it finds duplicate year/name pairs, so you can investigate before counting.
import csv
from collections import Counter
with open("nobelwinnerschemistry.csv", newline="",
encoding="utf-8-sig") as source:
rows = list(csv.DictReader(source))
seen = set()
counts = Counter()
for row in rows:
year = int(row["Year"])
identity = (year, row["FullName"].strip())
if identity in seen:
raise ValueError(f"Check duplicate: {identity}")
seen.add(identity)
counts[year] += 1
for year, count in sorted(counts.items()):
print(year, count)Decide what the result means before charting it.
- A row represents a recipient record. Multiple recipients can share an award, so this is not a count of prizes.
- A repeated recipient in a different year is a separate year/name pair. This is not a count of distinct people across the whole file.
- A missing year can mean missing coverage. Do not automatically fill it with a claim of “no award.”
- Country labels need a documented interpretation before cross-country comparisons. This example intentionally counts by year.
Once the sample run makes sense, download the complete file, rerun the same script, and check its coverage and sources. Your output should change with the input; sample counts are not an answer about the whole dataset.
When you need the whole list
Take your project
past the sample.
The sample is enough to check your script. A pass lets you run it over every available chemistry record and explore other Nobel category lists.
A Data Pass includes complete files in CSV, JSON, and XML, API access, and category ZIPs across the available catalog.
Data Pass
$39one payment / 365 days
Choose your passYour key arrives by email. No account to create and no automatic renewal.
For your own projects, coursework, teaching, research, and internal work. If you incorporate data into a product or service you provide to others, choose a Commercial Pass. Check the dataset’s scope and sources before buying; passes are non-refundable under our terms.