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 check what those counts tell you about the records in your file.
Python 3 · Standard library only · No key needed for the sample
Count the records.
Understand the results.
| Year | Recipient records |
|---|---|
| 2023 | 2 |
| 2024 | 3 |
| 2025 | 3 |
| 2026 | 2 |
The sample is the ten most recently added records, so its earliest year, 2023, may be incomplete. The counts describe the rows in this file, not the total number of winners or prizes in each year.
Run it against a local file
Read the CSV.
Count records by year.
Save the download as nobelwinnerschemistry.csv beside your script. The Nobel Prize Winners in Chemistry dataset includes Year, FullName, and Country.
The script checks that Year is a whole number and stops if the same name appears twice in the same year, so you can check those rows 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)What these counts tell you
- A row represents a recipient record. Multiple recipients can share an award, so this is not a count of prizes.
- Someone listed in two different years is counted once in each year. The script does not count unique people across the whole file.
- If a year is missing from the file, do not assume no prize was awarded that year.
- Before comparing countries, check what the Country field represents in the sources. This example groups records by year.
After trying the sample, you can use a pass to download the complete file and rerun the same script. Check the included years and source notes before drawing conclusions from the results.
When you need the whole list
Get the complete
datasets.
The sample is enough to check your script. The Data Pass lets you run it over every chemistry record and explore the other Nobel lists.
The Data Pass includes complete files in CSV, JSON, and XML, API access, and category ZIPs across the whole catalog.
Data Pass
$69one payment / 365 days
Get the Data PassYour key arrives by email. No account to create and no automatic renewal.
Use it in your own projects, coursework, research, or products you sell; commercial use is allowed, free or paid. Check the dataset’s scope and sources before buying; the Data Pass is non-refundable under our terms.