Two administrative notes:
- We'll have office hours tomorrow (Thursday, October 15th), at 17:00 in Israel (aka 10 a.m. Eastern). This is open to paid Bamboo Weekly subscribers and members of my LernerPython+data program. Come and ask any Pandas, Polars, and data-related questions you have! I'll send full info in a few hours.
- The 10th cohort of my Python, Data, and AI bootcamp (PythonDAB) starts on November 5th. If you want to get fluent with these technologies in a small, collaborative cohort, then this might be the program for you. Get more information at https://lernerpython.com/bootcamp/ or join the free info session I'm running on Sunday, registering here: https://us02web.zoom.us/webinar/register/WN_4rLcX1GYShmBvdQDQlM3ZA
The Nobel Prizes for 2026 were awarded earlier this month; you can read about the recipients at https://www.nytimes.com/article/nobel-prizes-2026.html?unlocked_article_code=1.IlE.fisy.lQXkws2dYxyt&smid=url-share.
These prizes have become, over more than a century, one of the best-known and highest honors in the world. (And yes, the economics prize isn't a "real" Nobel Prize, but let's be real; no one is going to say "no" if they are given the award.) This week, we'll examine Nobel Prize data, using the API provided by the official Nobel Prize site. We previously looked at Nobel Prizes three years ago, back in BW #36, if you want another challenge on similar data.
This week, instead of using Pandas, we'll use an alternative library, Polars (https://pola.rs/). Polars, as you might know, is written in Rust rather than a combination of C and Python, and provides an API for Python users. Because it is written in Rust, Polars runs faster -- often much faster -- than Pandas. The Polars core developers just released version 2.0 of the library, with many fixes, speedups, and improvements, and I decided to take it for a spin with this week's problems.
Data and five questions
This week's data comes from the API for the Nobel Prize, which is as official as things can get. We'll retrieve information in JSON format about the prize winners ("laureates") via the API provided at https://api.nobelprize.org, and documented at https://www.nobelprize.org/about/developer-zone-2/ . Once we have put the data into a Polars data frame, we'll then try to answer some questions.
Two notes about the API:
- By default, it restricted my retrieval of information, because of concern from bots. (Although who else is reading from a JSON API?) So you might need to pass a
User-Agentheader in your remote request. - By default, you get 50 responses per request. You can change that by passing a
limitargument to the URL, along with an integer describing the maximum number of records to return.
Paid subscribers, both to Bamboo Weekly and to my LernerPython+data membership program (https://LernerPython.com) get all of the questions and answers, as well as downloadable data files, downloadable versions of my notebooks, one-click access to my notebooks, and invitations to monthly office hours.
Learning goals for this week include: Polars, working with APIs, working with JSON, cleaning data, grouping, and plotting with Plotly.
Here are my five questions and tasks for this week. I'll be back tomorrow with my solutions and explanations.
- Retrieve information from the Nobel laureates API, and turn that data into a Polars data frame. You'll want columns with the English-language values for
id,fullName,orgName,gender,birth_date,now_country,death_date,prize, andaward_year. If the person received more than one prize, then have two rows, one for each prize. - How many people and organizations have won more than one prize? Show them, in what years they won, and which prizes they got.