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")
pd.set_option("display.max_rows",None)
nobel.head(10)
top_gender=nobel["sex"].value_counts().index[0]
top_gender
top_country=nobel["birth_country"].value_counts().index[0]
top_country
nobel["decade"]=(nobel["year"]//10)*10
nobel
nobel["usa"]=nobel["birth_country"]=="United States of America"
nobel_all=nobel.groupby("decade",as_index=True)["decade"].count()
nobel_all
nobel_usa=nobel.groupby("decade",as_index=True)["usa"].sum()
nobel_usa
max_decade=pd.concat([nobel_all,nobel_usa],axis="columns")
max_decade.rename(columns={"decade":"no of noble prizes","usa":"no of usa noble winners"},inplace=True)
max_decade["ratio"]=max_decade["no of usa noble winners"]/max_decade["no of noble prizes"]

max_decade.sort_values(by="ratio",ascending=False,inplace=True)
max_decade_usa=max_decade[max_decade["ratio"]==max_decade["ratio"].max()].index[0]
max_decade_usa
nobel["female_winner"]=nobel["sex"]=="Female"
nobel_females=nobel.groupby(["decade","category"],as_index=False)["female_winner"].mean()
nobel_females
max_females=nobel_females[nobel_females["female_winner"]==nobel_females["female_winner"].max()]
max_females_dict={max_females["decade"].values[0]:max_females["category"].values[0]}
max_females_dict