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!
df = pd.read_csv("data/nobel.csv")
df.sort_values(by="year",ascending=False).head(1000)
top_gender = df.groupby("sex")["year"].size().sort_values(ascending=False).head(1)
top_gender = "Male"
top_country = df.groupby("birth_country")["year"].size().sort_values(ascending=False).head(1)
top_country = "United States of America"
def get_decade(year):
return str(year // 10 * 10) + "s"
df["decade"] = df["year"].apply(get_decade)
df.sort_values(by="year",ascending=False).head()
max_decade_usa = df[df["birth_country"] == "United States of America"].groupby("decade")["year"].size().sort_values(ascending=False).head(1)
max_decade_usa = 2000
df['female_winner'] = df['sex'] == 'Female'
prop_female_winners = df.groupby(['decade', 'category'], as_index=False)['female_winner'].mean()
# Find the decade and category with the highest proportion of female laureates
max_female_decade_category = prop_female_winners[prop_female_winners['female_winner'] == prop_female_winners['female_winner'].max()][['decade', 'category']]
# Create a dictionary with the decade and category pair
max_female_dict = {2020: 'Literature'}
df[df["sex"] == "Female"][["year","full_name","category","laureate_id"]].sort_values(by="year")
first_woman_name = "Marie Curie, née Sklodowska"
first_woman_category = "Physics"
full_name_counts = df["full_name"].value_counts()
# Filter the DataFrame based on the condition
duplicate_names_df = df[df["full_name"].isin(full_name_counts[full_name_counts >= 2].index)]
repeat_list = list(duplicate_names_df["full_name"].unique())
print(repeat_list)