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 API key for the sample
Count the records.
Understand the results.
| Year | Recipient records |
|---|---|
| 2013 | 1 |
| 2014 | 3 |
| 2015 | 3 |
| 2016 | 3 |
This sample includes only one record for 2013. 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. 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.