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

# Start coding here!
nobel = pd.read_csv("data/nobel.csv")
print(nobel.info())
# Find top gender and birth country from nobel DataFrame
top_gender = nobel['sex'].value_counts().index[0]
top_country = nobel['birth_country'].value_counts().index[0]
# Find decade with highest ration of US-born winners to total winners
nobel["us_winners"] = nobel["birth_country"] == "United States of America"
nobel["decade"]= (np.floor(nobel["year"] / 10) * 10).astype(int)
by_dec = nobel.groupby("decade")
us_ratio = by_dec["us_winners"].mean()
max_decade_usa = us_ratio.sort_values(ascending = False).index[0]
# Find decade and category combination with the highest proportion of female laureates
nobel["is_female"] = nobel["sex"] == "Female"
nobel_female = nobel.groupby(["decade", "category"], as_index=False)
nobel_female_mean = nobel_female.mean()

# Find the row with the highest mean of is_female
max_row = nobel_female_mean.loc[nobel_female_mean["is_female"].idxmax()]

# Create a dictionary with decade and category
max_female_dict = {max_row["decade"]: max_row["category"]}
# Find first woman to win a Nobel Prize and the Category in which she won
nobel_is_female = nobel[nobel["is_female"] == True]
nobel_is_female_sort = nobel_is_female.sort_values("year")
first_woman_name = nobel_is_female_sort["full_name"].iloc[0]
first_woman_category = nobel_is_female_sort["category"].iloc[0]
# Find people who have won multiple Nobel Prizes
nobel_win_count = nobel["full_name"].value_counts()
nobel_multi_win = nobel_win_count[nobel_win_count >= 2].index
repeat_list = list(nobel_multi_win)