Skip to content

The Nobel Prize has been among the most prestigious international awards since 1901. Each year, awards are bestowed in chemistry, literature, physics, physiology or medicine, economics, and peace. In addition to the honor, prestige, and substantial prize money, the recipient also gets a gold medal with an image of Alfred Nobel (1833 - 1896), who established the prize.

The Nobel Foundation has made a dataset available of all prize winners from the outset of the awards from 1901 to 2023. The dataset used in this project is from the Nobel Prize API and is available in the nobel.csv file in the data folder.

In this project, you'll get a chance to explore and answer several questions related to this prizewinning data. And we encourage you then to explore further questions that you're interested in!

# Loading in required libraries
import pandas as pd
import seaborn as sns
import numpy as np

# Reading CSV
nobel_data = pd.read_csv("data/nobel.csv")
print(nobel_data.columns)
nobel_data.isnull().sum()
print(nobel_data.head())

# Most commonly awarded gender
top_gender = nobel_data["sex"].value_counts().index[0]
print(top_gender)

# Most commonly awarded country
top_country = nobel_data["birth_country"].value_counts().index[0]
print(top_country)

# Decade with the highest ratio of US-born Nobel Prize Winners to Total Winners
nobel_data["decade"] = (nobel_data["year"] // 10) * 10
nobel_winners_by_decade = nobel_data.groupby("decade")["laureate_id"].count()
US_born_winners = nobel_data[nobel_data["birth_country"]=="United States of America"].groupby("decade")["laureate_id"].count()
ratio = (US_born_winners/nobel_winners_by_decade).fillna(0)
max_decade_usa = ratio.idxmax()
print(max_decade_usa)

# Decade and Category with the Highest Propertion of Female Laureates
female_laureates = nobel_data[nobel_data["sex"]=="Female"].groupby(["decade", "category"])["prize"].count()
total_laureates = nobel_data.groupby(["decade", "category"])["prize"].count()
proportion = (female_laureates/total_laureates).fillna(0)
decade, category = proportion.idxmax()
max_female_dict = {decade: category}
print(max_female_dict)

# First Woman to receive Nobel Prize
female_winners = nobel_data[nobel_data["sex"] == "Female"]
first_female = female_winners.loc[female_winners["year"].idxmin()]
first_woman_name = first_female["full_name"]
first_woman_category = first_female["category"]
print(first_woman_name)
print(first_woman_category)

# Individuals & Organizations who have won the nobel prize more than once
counts = nobel_data['full_name'].value_counts()
repeats = counts[counts >= 2].index
repeat_list = list(repeats)
print(repeat_list)